cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1323
Views
5
Helpful
7
Replies

Encapsulation dot1q vlan-id

Iloveyou
Level 1
Level 1

I am confused about what this command does.

Does it
1) Allow that vlan id to pass through
OR
2) it encapsulates the original vlan in another vlan?

If it is scenario 1 as explained by my colleague,
how is this command different from switchport mode trunk allowed vlan <vlan id>?
Why is there encapsulation if it is just a vlan being allowed to pass through?

If it is scenario 2,
then is encapsulation dot1q same as qinq terminology?

1 Accepted Solution

Accepted Solutions

You can say that same principle of vxlan vlan tag are for subinterface router.

Yes and also for service instance in EVPN.

And in all,

Inbound for match

Outbound to add 

View solution in original post

7 Replies 7

in router on stick configurations, we use this command to tell router about the fames encapsulated VLAN coming via selected sub interfaces. 

https://www.ciscopress.com/articles/article.asp?p=2990405&seqNum=2

Please rate this and mark as solution/answer, if this resolved your issue
Good luck
KB

So I guess the encapsulation dot1q command is different when comparing router-on-a-stick and when comparing VXLAN? 

You can say that same principle of vxlan vlan tag are for subinterface router.

Yes and also for service instance in EVPN.

And in all,

Inbound for match

Outbound to add 

where is the command ?

Martin L
VIP
VIP

1. Some switches have both tagging tech: IEEE dot1q and Cisco proprietary ISL.  ISL is going away if not already gone on all new devices. Some switches have ISL as default (virtual IOS). Both sides of a single trunk link must agree on tagging vlans; either Dot1.Q or ISL. Frames leaving access port in vlan x must be tag as x on trunk link so that next hop switch knows that frame is for vlan x. there is special one "native" vlan for Dot1.Q which is not tagged. You may need to change encap of a trunk link manually.

2. Routers don't care too much about vlan tagging; vlan and tagging stops at routers. As you read chapter from CCNA book (link shared above), vlan id and encapsulation dot1q is needed to tell router interface what is what.  because you divided main router interface into sub-interfaces, you must tell/help router how to identify traffic. i.e. Frames coming/going on Fa0/0.10 are tagged as vlan 10 while Fa0/20 are vlan 20.  You do not need encap dot1q command on main router interface when you connect it to a switch and do not use  ROAS concept.

3. Q-in-Q is No same but similar. encapsulation dot1q already exists then you add another tagging. 

Regards, ML
**Please Rate All Helpful Responses **

This is no answer the question

If I put encapsulation dot1q <vanid> in interface ,

what happens if the router receive an untagged vlan?

And also what happens if the router receive a vlan with the same tag as the vlan id ?

So how is this command different from switchport mode access or switchport mode trunk?

Mode access  the sw not send tag ftame to device in other side of link.

Mode trunk the sw need to add vlan tag to frame otherwise other side of link how it know this frame for which sunbet 

Here come the command effect

The command make as 

For inbound 

Match tag and know which subent it is

For outbound

Add tag from this subnet to frame