An SVI shows up/down. Why, and what is autostate?
Show the answer
Say this first
An SVI comes up only when its VLAN exists in the VLAN database, the SVI is not shut down, and at least one layer 2 port in that VLAN is up and forwarding in spanning tree. That last rule is autostate. With no active ports the SVI shows up/down, its connected route is withdrawn and the switch stops advertising the subnet, which is what you want when nothing in the VLAN can be reached.
Go deeper
DSW1# show ip interface brief | include Vlan
Vlan10 10.10.0.2 YES NVRAM up up
Vlan30 10.30.0.2 YES NVRAM up downChecklist for a down SVI
- Does the VLAN exist?
show vlan id 30. On IOS, creatinginterface Vlan30does not create VLAN 30. - Is any access port in VLAN 30 up?
show interfaces status vlan 30. - Is VLAN 30 allowed, active and forwarding on some trunk?
show interfaces trunk. - Is spanning tree blocking every port in VLAN 30 on this switch?
- Is the SVI itself shut? That shows
administratively downinstead.
Excluding ports from the calculation
switchport autostate exclude on a port stops it from counting, for example a SPAN destination or a
monitoring port that should not keep a VLAN's SVI alive. NX-OS can turn autostate off per SVI with
no autostate.
They will ask next
Why is autostate a good thing?
Without it, a switch with no live ports in VLAN 30 would keep advertising 10.30.0.0/24 and attract traffic it can only drop. Autostate makes the route follow reality.
Traps
- Creating the SVI and assuming the VLAN exists. Check
show vlanon the same switch.