Comware Based
cancel
Showing results for 
Search instead for 
Did you mean: 

Question about the PVID in context of VLAN Trunks

Patrick Terlisten
Honored Contributor

Question about the PVID in context of VLAN Trunks

Hello everybody,

simple question: If I configure a port for a vlan trunk on a Comware-based switch, VLAN 1 is the default PVID for the port. 

Must frames for VLAN 1 have a VLAN tag or not, if they are entering this port? Is the VLAN tag removed if a frame for VLAN 1 leaves this port?

Thanks for advice!

Best regards,
Patrick
8 REPLIES
johnk3r
Respected Contributor

Re: Question about the PVID in context of VLAN Trunks

A PVID (Port VLAN ID) is an UNTAGGED packet that enters a switch port , the PVID is attched to the untagged packet and forwarded to a VLAN specified by the ID part of the PVID

**************************************
ATP FLEXNETWORK V3 | ACSA
Patrick Terlisten
Honored Contributor

Re: Question about the PVID in context of VLAN Trunks

Hello John,

thanks for your reply.

But how ware PVIDs handled in the context of VLAN trunks? If I have set a port to port mode trunk and the PVID is set to 1, my experience shows, that frames that carry a tag for VLAN 1, are discarded.

Best regards,
Patrick
johnk3r
Respected Contributor

Re: Question about the PVID in context of VLAN Trunks

I do not know if I understand your question, but I have this setting in the environment:

[Switch-Ethernet 1/0/6] port trunk permit vlan 2  6
Setting the port to allow VLAN 2 (telephony) and VLAN 6 (Host)
[Switch-Ethernet1 / 0/6] port trunk pvid vlan 6
Setting the port to send and receive non-tagueados frames on VLAN 6

**************************************
ATP FLEXNETWORK V3 | ACSA
16again
Respected Contributor

Re: Question about the PVID in context of VLAN Trunks

Good practice is to have both sides of the trunk using the same PVID.  (When misconfigured, different brand equipment will remind you every 30 seconds on the console, native VLAN mismatch.

Internally in the switch, all VLANs are tagged. 

For packets sent by trunkport on the switch:
You can use the PVID to select a single VLAN which is  sent without TAG

For packets received by the switch on a trunkport: 
Obvious: Untagged packets will enter the VLAN with id equal to the PVID.
Amazing: Packets already tagged with the PVID will also enter the VLAN with PVID !!! (If the VLAN is allowed on the trunk)

See HP 1920 Gigabit Ethernet Switch Series User Guide page 136

 

Apachez-
Trusted Contributor

Re: Question about the PVID in context of VLAN Trunks

Is 1920 a comware-device?

Regarding trunk vs access I fully agree.

The basics:

Access: Only accepts (and send out) untagged frames. These frames are internally tagged with a specific VLAN ID.

Trunk: Only accepts (and send out) tagged frames. These frames are already internally tagged with a specific VLAN ID.

Hybrid: As Trunk (above) with addition of one untagged VLAN which then is internally tagged with a specific VLAN ID. That is if untagged frames are received they are internally tagged, and for this particular VLAN ID when sent out these frames are sent out untagged.

So how does Native VLAN fit in the above description? Or is Hybrid VLAN the same as Trunk + Native?

Because you can still configure native vlan when using trunk (tagged) interfaces even on comware-devices.

The common best practice seems to be to always configure the native vlan when using trunk (tagged) interfaces and set that to a VLAN ID which isnt used anywhere else on the same device (so it becomes like a /dev/null in case an untagged frame arrives). This would also (if I recall it correctly) mitigate any Q-in-Q bypasses.

16again
Respected Contributor

Re: Question about the PVID in context of VLAN Trunks

@apachez
-1920 is indeed h3c comware based
-Your trunk definition is partly wrong.  A trunk can send&receive untagged packets for a single VLAN (Native vlan in cisco world, here PVID)
The recommendation to set PVID to non-existing or unused is indeed good practice,
-The hybrid port-mode type allows multiple UNtagged VLANs.  To me that's a very bad idea, and I refuse to even think about using it. (it might give single broadcast domain, dhcp ipv6RA trouble.....)

from 1920 manual: page 135:
"Hybrid port—A hybrid port allows traffic of some VLANs to pass through untagged and traffic of some other VLANs to pass through tagged. Usually, hybrid ports are configured to connect devices those support for VLAN-tagged packets are uncertain."

 

Apachez-
Trusted Contributor

Re: Question about the PVID in context of VLAN Trunks

Sounds odd that a trunk (as in tagged interface, not trunk as in multiple interfaces works as one) would allow untagged frames.

My definition comes from the manual but also how others such as Allied Telesis handles tagged interfaces.

Native vlan in those situations is still tagged but is the definition of where protocols who isnt vlan aware would go. Like spanning-tree etc (since STP != RVSTP).

Thats why you would see a log entry nagging about that the native vlan is different on each side (for untagged traffic there is no way for the devices to inform each other about this - unless you got LLDP/CDP running which you could have disabled).

16again
Respected Contributor

Re: Question about the PVID in context of VLAN Trunks

Just picked a Allied Telesys manual, and it seems like they use the PVID on tagged port  only for receiving untagged packets.

However, on Cisco, HP, Linksys Netgear switches, when using tagged ports to VLAN unaware endpoint devices (like a normal PC), the endpoint device behaves as if it's just plugged into a access port in native/PVID LAN.....so these switches send and receive untagged packets for native VLAN.