Quick tip: VLAN interface status

Vijay sent me this question a while ago:

I have configured a L3 VLAN interface on a Cisco 3750 switch and assigned an IP address to it. I haven't assigned any ports to this VLAN. Why am I not able to ping the IP address of the VLAN interface from the switch itself?

The VLAN interface (like any other interface) has layer-1 and layer-2 state.

The layer-1 state is displayed in the Status column of the show ip interface brief command, the layer-2 state in the Protocol column.

A VLAN interface is always up, but its line protocol state tracks the state of attached ports: if at least one port is operational, the line protocol of the VLAN interface is up, otherwise it’s down. With no ports assigned to a VLAN, the line protocol of the VLAN interface is down, its IP address is not in the IP routing table and thus you cannot ping it.

This article is part of You've asked for it series.

18 comments:

  1. Hello, if there is not any port assigned to the vlan and up, the interface is down, so the only way is to put a
    no keepalive in the interface vlan so it will remain up and also write ip routing to activate inter vlan routing.

    kind regards

    ReplyDelete
  2. Agreed. The SVI interface (interface vlan x) is not always up. It's only up when the following are true.

    The vlan is created (show vlan brief)
    At least one port that is associated to that VLAN is up

    OR

    The no keepalive option is enabled.

    ReplyDelete
  3. Ivan Pepelnjak15 July, 2009 10:24

    The "no keepalive" option does not work on my router (1800, 12.4(15)T). On which box did it work for you?

    ReplyDelete
  4. I tried on physical interfaces, I didn't on logical but I always thought that this works on int vlans...

    ReplyDelete
  5. Try "no autostate" instead, that should do it...

    ReplyDelete
  6. "With no ports assigned to a VLAN, the line protocol of the VLAN interface is down"

    Dont forget this also includes trunk ports. I see this from time to time.

    ReplyDelete
  7. Thanks for the "no autostate" tip!

    ReplyDelete
  8. you can enter into vlan configuration, by vlan <id> and issue the "state active" command, and your Vlan interface will be up/up.

    ReplyDelete
  9. Ivan Pepelnjak16 July, 2009 07:48

    Does not work on my SOHO router (181x, 12.4(15)T). The autostate calculation AND the VLAN state must be active for the interface to be up/up.

    ReplyDelete
  10. Understanding and Troubleshooting the Autostate Feature in Catalyst Switches

    http://www.cisco.com/en/US/products/hw/switches/ps700/products_tech_note09186a0080160b14.shtml

    ReplyDelete
  11. Ivan Pepelnjak20 July, 2009 13:40

    Thanks for the link. See also the follow-up post:

    http://blog.ioshints.info/2009/07/followup-vlan-interface-status.html

    ReplyDelete
  12. this helped me. thanks

    ReplyDelete
  13. hello,

    maybe you can comment on the following case:

    I have a vlan subinterface that always remains up
    the client route attached to the subinterface will always be advertised by my IGP from this subinterface even when the remote CPE is down

    Is there anyway to get a vlan subinterface to go down if the mac adresse of the remote CPE disparrears?

    thanks

    ReplyDelete
  14. Ivan Pepelnjak15 June, 2010 18:26

    You probably need reliable static routing, BFD for static routes or Ethernet OAM.

    ReplyDelete
  15. Hi ,

    Got a question , Please help out

    Vlan 99 UP DOWN <-- --> Will this happen if one or a few ports is down in the in the vlan ? Or if all ports down ?

    ReplyDelete
  16. If Vlan is down ,how to troubleshoot

    ReplyDelete
  17. I have VLAN 80 and VLAN 85,Suppose Vlan 80 is down,how to troubleshoot them.

    ReplyDelete
  18. With an 87x (IOS 12.4T7 w/ IP Services), in a router-on-a-stick scenario where I only wanted the trunk port to be a member of the VLANs, I had to force the vlans to be created in the VLAN database by temporarily issuing "switchport access vlan x" on an L2 interface. Else they would not show up in "sh vlan-switch brief", and the vlanx interfaces would be up/down.

    ReplyDelete

You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.

Ivan Pepelnjak, CCIE#1354, is the chief technology advisor for NIL Data Communications. He has been designing and implementing large-scale data communications networks as well as teaching and writing books about advanced technologies since 1990. See his full profile, contact him or follow @ioshints on Twitter.