大网数据广告活动
服务器运维问答

Why are untagged VLANs configured separately from the port PVID?

· 52CE 我爱测

After misconfiguring a switch port yesterday, I'm curious: in what situation would you configure an untagged VLAN on a switch port and not set the PVID to that same vlan? On all the switches I've worked with these two values are …

问题原文

原帖链接 · larsks · CC BY-SA 4.0

After misconfiguring a switch port yesterday, I'm curious: in what situation would you configure an untagged VLAN on a switch port and not set the PVID to that same vlan?

On all the switches I've worked with these two values are configured separately (where VLAN tagging is primarily and egress configuration, and PVID is an ingress setting), but it seems if they don't match, you have a broken configuration.

已采纳解答

原帖链接 · Ron Trunk · CC BY-SA 4.0

I agree it's a little confusing, and I cannot think of a case where the two values wouldn't match. Enterprise-grade switches don't seem to have this problem.

EDIT:

Netgear (and Dell) use some confusing terminology. But the principles are the same for any VLAN-capable switch:

VLANs are identified by number, and that is the PVID. So "vlan 6" has PVID = 6.

VLAN tagging is done per port. So a VLAN can be untagged on one port, but tagged on another.

If a port has only an untagged VLAN, then we call it an access port. The PVID is not part of the Ethernet frame that's sent out the port. Frames received on that port are put into the untagged VLAN. If the untagged VLAN is 6, any untagged frame received on that port is put into VLAN 6.

Cisco calls an untagged VLAN a native VLAN. It's just a different term for the same thing.

If you don't specify an untagged (native) VLAN on a port, then the untagged VLAN defaults to VLAN 1 (PVID=1). This is what Dell and Netgear mean by "default" VLAN: the VLAN that's assigned if you don't specify one. That is NOT the same as Native VLAN (see above). VLAN 1 can be tagged or untagged on a port.

If you tag a VLAN on a port, it's called a trunk port (Cisco term). Trunk ports are usually used to interconnect switches. Most PCs don't understand tagging since a tagged frame is a different Ethernet format. You can have as many tagged VLANs on a port as you like. But the port can have no more than one untagged VLAN. You can also disable untagged frames on a trunk port.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-11-28)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。