Friday, June 3, 2016

Autostate Feature in Catalyst Switches - The case of a missing Vlan Protocol Up notification

I was puzzled today by this piece of link-state-notification:

S2(config)#int f0/6
S2(config-if)#switchport mode access
S2(config-if)#switchport access vlan 99
S2(config-if)#int f0/11
S2(config-if)#switchport mode access
S2(config-if)#switchport access vlan 10
S2(config-if)#int f0/18
S2(config-if)#switchport mode access
S2(config-if)#switchport access vlan 99
S2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to up


The reason I was puzzled was: why did the protocol stay down when I assigned port f0/6 to VLAN99? or port f0/11 to VLAN 10?

Ok, lets go to the best source...
Autostate Feature in Catalyst Switches 
http://www.cisco.com/c/en/us/support/docs/switches/catalyst-6500-series-switches/41141-188.html

Introduction
The autostate feature notifies a switch or routing module VLAN interface (Layer 3 (L3) interface) to transition toup/up status when at least one Layer 2 (L2) port becomes active in that VLAN.The router VLAN interfaces have to fulfill the following general conditions to be up/up:
  1. VLAN exists and is in active status on the switch VLAN database.
  2. VLAN interface exists on the router and is not administratively down.
  3. At least one L2 (access port or trunk) port exists and has a link up on this VLAN. The latest implementation of the autostate feature allows synchronization to Spanning-Tree Protocol (STP) port status.
A VLAN interface will be brought up after the L2 port has had time to converge (that is, transition from listening-learning to forwarding). This will prevent routing protocols and other features from using the VLAN interface as if it were fully operational. This also prevents other problems, such as routing black holes, from occurring.
At least one L2 (access port or trunk) port is in spanning-tree forwarding state on the VLAN.

LESSON 1: a misplaced port on VLAN 99

First, I investigated the link state for VLAN 99.

In my case, interface Vlan99 has been previously created with ip address 172.17.99.12 255.255.255.0. So, why didn't the line protocol come up after f0/6 was assigned to it? Why did it wait until f0/18? Will the line protocol stay up if I take down f0/18?

Checking what will happen if I take f0/18 off the VLAN

S2(config)#int f0/18
S2(config-if)#no switchport access vlan 99
S2(config-if)#

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to down

So, it was the presence of a f0/18 that got the protocol to come up.

The protocol line state for the VLAN interfaces will come up when the first switchport belonging to the corresponding VLAN link comes up and is in spanning-tree forwarding state.

So, why is it not counting f0/6 as the first switchport to come up?

Troubleshooting the Autostate Feature on IOS Based Switches

checking STP (with only f0/6 is assigned to vlan 99)

S2(config-if)#do show spanning-tree vlan 99
No spanning tree instance exists.


No spanning tree??? Strange. Let's add f0/18 and re-check the spanning tree

S2(config)#int f0/18.
S2(config-if)#switchport access vlan 99
S2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to up

 lets check out STP


But why doesn't STP mention my port f0/6? If it blocked it, I should see it here. Maybe something is wrong with the port. Checking the status of my f0/6.

S2#show int f0/6
FastEthernet0/6 is down, line protocol is down (disabled)

Checking my topology. Aha! my f0/6 should indeed be in Vlan 99, but on a different switch. DOLT!!!! S2 has no end devices attached to f0/6. That is why STP is not worrying about f0/6, and neither is VLAN 99.

So, the lesson to be learned from this story: 
If you write
S2(config-if)#switchport mode access
S2(config-if)#switchport access vlan 99
and there is no notification %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to up, then check your topology. You might be configuring the wrong port!




Lesson 2: missing interface VLAN 10


Then, my next question was: why didn't f0/11 assigned to Vlan 10 produce a notification of line protocol up?

S2(config-if)#int f0/11
S2(config-if)#switchport mode access
S2(config-if)#switchport access vlan 10
S2(config-if)#int f0/18
S2(config-if)#switchport mode access
S2(config-if)#switchport access vlan 99
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to up

So, we know that my line protocol for VLAN 99 is up. 
But is my line protocol for vlan 10 up or down?

Checking show vlan only tells me if the vlan is active or not.... but nothing about the line protocol state.

I started by checking the status of line protocol on vlan 99
S2#show int vlan 99
Vlan99 is up, line protocol is up

The, trying to check status vlan 10
S2#show interface vlan 10
%Interface Vlan10 does not exist.

So, here is the answer. We got a notice of line protocol up for VLAN 99 because we had an interface vlan 99 set up. The VLANs with no interface vlan set up do not get the line to come up or down. Dolt!!!!

No comments:

Post a Comment