cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
566
Views
0
Helpful
3
Replies

Again: Fundamentals of trunks, tags and native vlans

Photogregor
Level 1
Level 1

Hi,

another question about the old access/trunk/native/tag/vlan stuff:

I understand, that the only port that's allowed to tag an egress frame is a trunk port. A trunk port always has a friend who is trunk port as well and who is allowed of receiving tagged frames. So if trunk port on switch 1 gets a frame that has to be transmitted to its trunk port friend on switch 2, it has to make some decisions about the treatment of this frame. If it derives from an ingress port on switch 1 which has no special port vlan id, the trunk port will transmit this packet as it is, without any tag, to the trunk port on switch 2. Trunk port on switch 2 then knows "Oh, I got an untagged frame from my trunk friend on switch 1, so this frame can only be sent to these ports, that belong to native vlan (which is per default vlan 1)."

But if the (egress) trunk port on switch 1 is instructed to transmit a frame which derives from an ingress port belonging to vlan 2, then it has to tag this frame with the corresponding vlan id before it is transmitted to switch 2.

And now my question: How does the trunk port on switch 1 know, to which vlan a frame, which is supposed to be transmitted, belongs to? I.e. whether a frame has to be transmitted without tag (when it belongs to the native vlan) or has to be tagged (if it derives from one of those ingress ports, that where explicitly assigned to a vlan)?

Is there a sort of table to which the trunk port can refer and which states: "This frame comes from Gi0/1 which is assigned to vlan 99, so tag this frame accordingly before transmitting it to the other trunk port"? or "This frame comes from an ingress port without any assignment of a vlan id, so treat it as native and transmit it as it is (without tag) to the other trunk port"? 

Is it like that or am I wrong in my understanding?

Thanks for any clarification,
Stefano

1 Accepted Solution

Accepted Solutions

Richard Burts
Hall of Fame
Hall of Fame

Stefano

When I read your beginning paragraph about what you understand I thought that it was pretty close to spot on. But then as I read the rest of your post I realize that there is a small flaw in your understanding. There are a couple of references in your post about ports which do not have any assignment of a vlan. And this is the flaw in your understanding. You seem to believe that if there is no specific vlan assignment that the port does not belong to a vlan. This is not correct. There is a default vlan (typically vlan 1) and any port/interface which does not have a specific vlan assignment (and which is no a trunk port) will belong to the default vlan. So yes there is a sort of table to which the trunk port can refer and that table is the vlan membership table. If you use the command show vlan on the switch it will display the vlan membership table (and note how many ports belong in vlan 1). So in your example Gi0/1 is assigned to vlan 99 and is tagged with 99. Perhaps Gi0/2 has no vlan assignment in the config. But show vlan will show that Gi0/2 belongs to vlan 1 and will be tagged accordingly (or will be transmitted untagged if vlan 1 is the native vlan).

HTH

Rick

HTH

Rick

View solution in original post

3 Replies 3

Richard Burts
Hall of Fame
Hall of Fame

Stefano

When I read your beginning paragraph about what you understand I thought that it was pretty close to spot on. But then as I read the rest of your post I realize that there is a small flaw in your understanding. There are a couple of references in your post about ports which do not have any assignment of a vlan. And this is the flaw in your understanding. You seem to believe that if there is no specific vlan assignment that the port does not belong to a vlan. This is not correct. There is a default vlan (typically vlan 1) and any port/interface which does not have a specific vlan assignment (and which is no a trunk port) will belong to the default vlan. So yes there is a sort of table to which the trunk port can refer and that table is the vlan membership table. If you use the command show vlan on the switch it will display the vlan membership table (and note how many ports belong in vlan 1). So in your example Gi0/1 is assigned to vlan 99 and is tagged with 99. Perhaps Gi0/2 has no vlan assignment in the config. But show vlan will show that Gi0/2 belongs to vlan 1 and will be tagged accordingly (or will be transmitted untagged if vlan 1 is the native vlan).

HTH

Rick

HTH

Rick

Perfect, no more questions! Thanx, Stefano

Stefano

You are welcome. I am glad that my explanation was helpful. Thank you for using the rating system to mark this question as answered. This will help other readers in the forum to identify discussions that have helpful information. These forums are an excellent place to learn about networking. I hope to see you continue to be active in the forums.

HTH

Rick

HTH

Rick
Review Cisco Networking for a $25 gift card