我对 VLAN 的概念完全陌生,今天才读到相关内容。如果我的问题听起来很愚蠢,请见谅。
假设我将 10 端口 Cisco 交换机上的端口 g2 设置为通用端口(因此可以成为多个带标签/不带标签的 VLAN 的一部分)。此外,g2 设置为 1U、2U、3U、4T(VLAN 1、2、3、4,其中 1、2、3 不带标签,4 带标签)。未设置 PVID。
我的问题是,当未标记的帧发送到端口 g2 时会发生什么?由于未设置 PVID,交换机将如何管理该帧?
答案1
Every trunk port/port-group on a Cisco switch can have a default vlan, it's this vlan that is added to untagged traffic that needs further trunking, or if it's a L3 switch can be used for routing internally. As Chris suggests though it a ONE default vlan, as there'd be nothing to define which non-existant vlan untagged traffic was supposed to go on. Ultimately try to tag all traffic in a mixed vlan environment if you can.
答案2
On HP switches, I can't speak for Cisco, a port may belong to zero or one untagged VLAN and any number of tagged ones. As soon as you assign that port as belonging, untagged, to another VLAN it is taken out of the original VLAN. Having traffic from two VLANs arrive in an untagged state would be an error condition worthy of firmware fixes.
However, if it DID happen, it would look just like any other packet to the device(es) on the other end of the port. It would presumably have completely different IP information on it and would thus get ignored for the most part, but it would look normal.
答案3
My switching knowledge is sketchy, but:
You can't send more than one untagged VLAN to a port. As soon as you start sending more than one VLAN you HAVE to use tagging.
Also I'm not sure there's such a concept as 'no PVID setup', I think that the PVID is already set on all ports, but you can change the value.