On this page

GUIDES

Find why a trunk drops a VLAN

One VLAN is down and the rest of the site works. Read the trunks on a Cisco IOS XE switch in the terminal, find the VLAN missing from the allowed list and add it without replacing the list, then see the same ticket handed to Lina and fixed as a governed change.

Verified against AI NetShell 0.4.20

"Marketing says the internet is down." Everyone else is working, the switch looks healthy, and the port is up. When one VLAN is dead and the rest of the site works, look at the trunks that carry that VLAN off the switch. This guide works the ticket by hand in an AI NetShell terminal on a Cisco IOS XE access switch, then shows the same ticket handed to Lina, the assistant built into the app, and the fix applied as a governed change: a change Lina proposes, you review as a diff and approve, the app applies and checks on the device, and the app can roll back.

The example follows the recording on the features page. The access switch is C9K-ACC1. Marketing is VLAN 20, named USERS-B on the switch, and their PC is on Gi1/0/20. The two uplinks, Gi1/0/1 and Gi1/0/2, are trunks to the core switches C9K-CORE1 and C9K-CORE2.

You need a terminal open to the switch in enable mode. The terminal needs no account; opening one is covered in Terminal basics. For the second half you also need your account signed in on Investigate, Resolve or the Resolve trial: on Included AI, Lina spends the plan's AI credits; with your own AI key or ChatGPT sign-in, the app requires the Investigate plan or higher. Applying the fix as a governed change needs the Resolve plan and Allow configuration changes turned on under Settings > General.

Why one dead VLAN points at a trunk#

A VLAN's gateway normally sits on the core, so the VLAN's traffic has to cross a trunk to get anywhere. A tagged VLAN crosses a link only when five things are true at once, on both ends of the trunk and on every trunk between the two hosts:

  1. The VLAN exists in the switch's VLAN database and is active.
  2. The port is a trunk in operation, not just configured as one.
  3. The VLAN is in the trunk's allowed list.
  4. Both ends agree on the native VLAN, the one carried untagged.
  5. Spanning tree has the VLAN forwarding on that trunk, and pruning has not removed it.

What passes is the intersection of the two ends, so never conclude from one switch alone. On Cisco IOS XE, show interfaces trunk answers 2, 3 and 5 for every trunk in one screen, and show vlan brief answers 1. These are the same five conditions, in the same order, that Lina's playbook for this fault checks.

1. Confirm the VLAN exists and the port is in it#

text
show vlan brief
show interfaces status

The VLAN should be active with the users' port listed under it. From the switch in the recording, trimmed:

text
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Gi1/0/3, Gi1/0/4, Gi1/0/5, Gi1/0/6
10   USERS-A                          active    Gi1/0/10
20   USERS-B                          active    Gi1/0/20
999  NATIVE-PARKING                   active

Read the Status column, not just the row. active is the only good answer: act/lshut means the VLAN is shut down in the database, and suspended is the same verdict under another name. In show interfaces status, the users' port should read connected with the right VLAN number in its Vlan column. If the port is in the wrong VLAN, fix that first. Here VLAN 20 is active and Gi1/0/20 is in it, so the users' side is fine.

2. Read what the trunks carry#

text
show interfaces trunk

The output is four tables. Read them in order, and watch for the table where your VLAN stops appearing:

  1. Mode, status and native VLAN. Each uplink should read trunking. A port missing from this table is not trunking at all, whatever its configuration says.
  2. Vlans allowed on trunk. The configured allowed list. If your VLAN is not here, you have found the cause.
  3. Vlans allowed and active in management domain. A VLAN in table 2 but not here is missing, shut down or suspended in this switch's own database. The allowed list is a filter, not a definition: allowing 20 does not create 20.
  4. Vlans in spanning tree forwarding state and not pruned. A VLAN in table 3 but not here is blocked by spanning tree on this trunk or pruned by VTP. Only the VLANs in this table carry traffic.

From the switch in the recording, in the fault state:

text
Port           Mode             Encapsulation  Status        Native vlan
Gi1/0/1        on               802.1q         trunking      999
Gi1/0/2        on               802.1q         trunking      999

Port           Vlans allowed on trunk
Gi1/0/1        10,999
Gi1/0/2        10,999

Port           Vlans allowed and active in management domain
Gi1/0/1        10,999
Gi1/0/2        10,999

Port           Vlans in spanning tree forwarding state and not pruned
Gi1/0/1        10,999
Gi1/0/2        10,999

VLAN 20 is missing from the allowed list on both uplinks. Both trunks are up, and VLAN 10 is allowed and forwarding, which is why everyone else is fine. Spanning tree agrees: show spanning-tree vlan 20 on this switch listed only Gi1/0/20, because a trunk that does not allow a VLAN takes no part in that VLAN's spanning tree.

Had VLAN 20 been in table 3 but not table 4, the next reads would be show spanning-tree vlan 20 and show spanning-tree interface Gi1/0/1 for a per-VLAN block, then show vtp status for pruning. Had an uplink been missing from table 1, show interfaces Gi1/0/1 switchport shows the administrative and operational modes.

A terminal tab open to C9K-ACC1 showing the four tables of show interfaces trunk in the fault state, with only VLANs 10 and 999 on both uplinks, and Lina's chat panel beside it before any question
A terminal tab open to C9K-ACC1 showing the four tables of show interfaces trunk in the fault state, with only VLANs 10 and 999 on both uplinks, and Lina's chat panel beside it before any question

3. Read the trunk configuration and find the far end#

Confirm the cause in the configuration, so you know exactly what you are changing:

text
show running-config interface GigabitEthernet1/0/1
show running-config interface GigabitEthernet1/0/2

From the switch in the recording, one uplink:

text
interface GigabitEthernet1/0/1
 switchport trunk allowed vlan 10,999
 switchport trunk native vlan 999
 switchport mode trunk
end

Then find the other end of each trunk, because a trunk has two allowed lists and the fix may be needed there too:

text
show cdp neighbors
text
Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
C9K-CORE1.lab.local
                 Gig 1/0/1         157             R S I  C9KV-UADP Gig 1/0/2
C9K-CORE2.lab.local
                 Gig 1/0/2         129             R S I  C9KV-UADP Gig 1/0/2

Gi1/0/1 goes to C9K-CORE1 and Gi1/0/2 to C9K-CORE2, each on the core switch's Gi1/0/2. Where CDP is off, show lldp neighbors gives the same answer on a switch that runs LLDP. A trunk has two allowed lists, so before you change anything, open a terminal to each core switch and read show interfaces trunk there too: if the core's Gi1/0/2 also leaves VLAN 20 out, both ends need the fix.

To learn when the list changed, you need a copy from before. If the app holds an earlier backup of the switch, take a backup now and compare the two in the Backups tab; the two capture times bound when the list changed. See Backups and drift.

4. Add the VLAN without replacing the list#

This is the step that takes down the other VLANs when it is done wrong. switchport trunk allowed vlan 20 replaces the whole list with VLAN 20 alone, so VLAN 10 and the native VLAN drop off the trunk. Use add:

text
configure terminal
 interface GigabitEthernet1/0/1
  switchport trunk allowed vlan add 20
 interface GigabitEthernet1/0/2
  switchport trunk allowed vlan add 20
 end

Fix both uplinks in the same change. If only one carries the VLAN, the ticket comes back the first time traffic moves to the other link. The add form removes nothing, so nothing else on the trunk changes.

5. Check the result#

text
show interfaces trunk

From the switch in the recording after the fix:

text
Port           Vlans allowed on trunk
Gi1/0/1        10,20,999
Gi1/0/2        10,20,999

Port           Vlans allowed and active in management domain
Gi1/0/1        10,20,999
Gi1/0/2        10,20,999

Port           Vlans in spanning tree forwarding state and not pruned
Gi1/0/1        10,20,999
Gi1/0/2        10,20,999

VLAN 20 is now in all three lists. Then prove that the VLAN crosses the trunk:

text
show mac address-table vlan 20

The PC's address should be on Gi1/0/20 and the gateway's address on an uplink. A table that holds only local addresses in VLAN 20, while other VLANs learn remote addresses on the same uplink, means the trunk is still filtering this VLAN. Then have a Marketing user ping the gateway and open a website.

6. Check the other end, then save#

If the core side also leaves VLAN 20 out, or has no gateway for VLAN 20, Marketing is still down. On each core switch, run show interfaces trunk and read the row for its Gi1/0/2, which should now carry VLAN 20 in all three lists, then show ip interface brief | include Vlan20 for the gateway. In the recording the fault was on the access switch, and the core switches were not read.

When you are satisfied, save the running configuration to startup, with copy running-config startup-config or write memory, in whatever form your change process requires.

The same ticket with Lina#

The recording on the features page, 35 seconds and silent, shows this ticket worked in the app. It was recorded on version 0.4.15: the reads, the finding and the fix are as it shows, and the button names below are the ones in 0.4.20. Start from the fault: Lina reads the switch as it is now, so if you have already added VLAN 20 by hand above, she will not find it missing.

You ask. With the switch's terminal open and in front, type the ticket in the chat box and select Send: "Marketing says the internet is down. They're on VLAN 20 on this switch." The Reads: this terminal chip under the box says Lina reads this switch. Under the default Auto-approve reads, the show commands on this page are on the Cisco IOS XE permit list and run without a click; the configuration reads need the session in enable mode. Choosing devices and the approval mode is covered in Ask Lina about a problem.

Lina reads the switch. A ticket like this one matches her vlan-trunk-mismatch playbook, which checks the five conditions above in that order; the chat shows a Playbook row when she loads it. With a full running-configuration backup of the switch from the last 30 days, she can compare it with the running configuration first and report what changed, if anything. Each command she runs appears in the chat under the device's name, and its output is in your terminal. In the recording she read show running-config, show interfaces trunk, show vlan brief, show interfaces status, and the configuration of Gi1/0/1 and Gi1/0/2.

She shows the evidence. Her answer comes in four labeled parts, Checked:, Finding:, Explanation: and Next:. In the recording: Gi1/0/20 is in VLAN 20 and that is fine; both uplinks to the core switches allow only VLANs 10 and 999, so VLAN 20 has no path off the switch. The core switches were not read, so whether they allow and route VLAN 20 is still open; that is step 6 above.

One finding, one fix. A card appears under her answer. One root cause fixed on several interfaces is one finding, so the card covers both uplinks. Its header shows the severity and the device, for example High · C9K-ACC1, and the tag beside the finding says how it was established: Lina's conclusion when the app did not confirm it from its own readings, Confirmed by the app when it did. Below are Cause:, Evidence with Show output, and the fix lines with Copy. Lina is told that a command which sets a list replaces it, and to prefer the additive form, so the fix is the four lines below. On a Cisco switch the card adds configure terminal before them and end after, so what you copy is ready to paste:

text
configure terminal
interface GigabitEthernet1/0/1
 switchport trunk allowed vlan add 20
interface GigabitEthernet1/0/2
 switchport trunk allowed vlan add 20
end

On a plan without governed changes, or with Allow configuration changes off, the step offers Copy, Check again, Done and Skip, and you paste the lines into the terminal yourself. Check again cannot confirm an added VLAN from the configuration, because the running configuration shows the resulting list, not the add line, so expect the step to say it could not confirm the fix and to offer Ask Lina to check. Read show interfaces trunk yourself, as in step 5, then select Done. The card's buttons are described in Ask Lina about a problem.

The finding card under Lina's answer: High · C9K-ACC1, the Governed change line, Cause:, Evidence with Show output, the six fix lines with Copy, and the Review change and Skip buttons. Her Checked, Finding, Explanation and Next parts sit just above, out of view
The finding card under Lina's answer: High · C9K-ACC1, the Governed change line, Cause:, Evidence with Show output, the six fix lines with Copy, and the Review change and Skip buttons. Her Checked, Finding, Explanation and Next parts sit just above, out of view

Review and approve (Resolve). With the Resolve plan and Allow configuration changes on, the step reads Governed change: you approve these exact lines, then the app applies and checks them. and offers Review change. The app checks each line against the switch's write policy, which allows switchport trunk allowed vlan add, and opens Approve change · C9K-ACC1. For a change that only adds lines and does not touch the path your session rides on, the risk chip reads Low risk · adds config, and the window shows Checks passed · commands allowed by your write policy, device reachable, then, where the app first saves a rollback copy on the switch, Backup copy before sending: and the copy's name, then If the check fails with its answer, and the diff with the two added lines under their interfaces. Nothing is sent until you select Apply to C9K-ACC1. If the window warns instead that the change touches the path this session rides on, it asks you to confirm by typing the device name; read Fix a problem before you do.

The Approve change · C9K-ACC1 window before approval: Low risk · adds config, the Checks passed and If the check fails lines, the Current and Proposed columns with the two added switchport trunk allowed vlan add 20 lines, Lines to send, and the Cancel and Apply to C9K-ACC1 buttons
The Approve change · C9K-ACC1 window before approval: Low risk · adds config, the Checks passed and If the check fails lines, the Current and Proposed columns with the two added switchport trunk allowed vlan add 20 lines, Lines to send, and the Cancel and Apply to C9K-ACC1 buttons

The app checks the switch. While the lines go out, the window reads Sending the lines to C9K-ACC1. Watch the terminal. and the terminal's header shows Typing paused: a change is running followed by the seconds elapsed; what you type there is not sent. Then the title changes to Change applied · C9K-ACC1 and Post-change check counts down 30 seconds before the app reads the switch again (select Check now to read sooner). For an allowed-list change, the check the app reads back names the interface and the VLANs it now allows, such as allows VLANs 10, 20, 999: the list it read before the change plus the VLAN you added, because add is compiled as the old list joined with the new entry. When the check passes, the status line reads ✓ Verified on the device with the time, and the panel says how many of its checks passed, Read back from C9K-ACC1, and either Nothing else changed with the number of areas it compared or Something else changed: naming them. Roll back stays beside the status line while the app still holds the rollback for this change; it reads the switch again first and refuses if the configuration has changed since (the refusals are in Fix a problem). The four lines went out as one change, so one rollback undoes both interfaces: it restores the copy the app saved on the switch just before the change.

Save when you are satisfied. The change is in the running configuration only. Once the check has passed, the window reads Not saved yet. A reload would undo this change. and offers Save changes. It asks Save changes? first and says that the save includes anything changed by hand since the last save, because it saves the whole running configuration. The line changes to Saved to the startup config with the time, The device confirmed it., only when the switch confirms the save. The app does not save on its own.

The Change applied · C9K-ACC1 window: ✓ Verified on the device with Roll back, the Post-change check panel with 2 of 2 passed and both uplinks allowing VLANs 10, 20, 999, the other checks, What changed, the Not saved yet line, and the Save changes button
The Change applied · C9K-ACC1 window: ✓ Verified on the device with Roll back, the Post-change check panel with 2 of 2 passed and both uplinks allowing VLANs 10, 20, 999, the other checks, What changed, the Not saved yet line, and the Save changes button

The notes. The ⋯ menu at the top of the chat panel offers Technical notes and Executive summary, Markdown files on every plan. The Technical notes record the case's status, Cause found when a fault was isolated, and carry the exact fix lines.

Next#

  • Ask Lina about a problem: what Lina reads, how reads are approved, and every button on the finding card.
  • Fix a problem: the risk chip, the confirm step, the check, Save changes and Roll back in full.
  • Backups and drift: comparing two copies of a configuration to see what changed and when.
  • Terminal basics: opening a session to a device you manage.

Checked on AI NetShell 0.4.20