Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When creating a sub-interface for use with dot1q encapsulation. Do I have to match the name of the interface with the vlan number?

For example:

int g1/0/0.40
encap dot1q 40

or would this also work?

int g1/0/0.50
encap dot1q 40
share|improve this question
up vote 2 down vote accepted

Do I have to match the name of the interface with the vlan number?

No, I don't believe so. It's just a standard convention (and one I'd highly recommend sticking to) to reduce confusion when reading or modifying the config.

share|improve this answer

Are you asking does the VLAN ID need to have anything to do with the IP range? If so then not at all, VLANs are a layer 2 function, they don't care about IP at all.

share|improve this answer

Agreed with ErikA, it keeps it easy to remember what sub-interface is mapped to what vlan. In some cases, sub-interfaces, vlans, and hsrp groups can use the same number to keep track of them all.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.