Let's say I know my switches configurations, for each, I know what port are configured in access, what port are in trunk, and what vlan is on a port. For each device. I want to group vlan that can commuicate together. But i can't manage to find a necessary and sufficient condition.
If a two switch (SW1
and SW2
) are connected through access ports
, I can say that the 2 vlan configured on those ports can communicate toghether right ? But now that SW2
has reveived the untagged tram from SW1
, what does it do with it?
If my port on SW1
was access vlan2
and my port or SW2
was access vlan3
. Does that mean my sw1.vlan2
and my sw2.vlan3
are on the same layer2 network
?
The trunk
case is easier because their is a tag. The only way I found for VLANs
to be mixed on a trunk port is if native vlan on both ends are different (Native vlan mismatch on cisco)
My question : Is there a necessary and sufficient condition that I could check to know if two vlan belongs to the same network
Edit sum up of what I understand after the answers:
If sw1--access--access--sw2
, both VLAN
configured belongs to the same l2
if sw1--trunk--trunk--sw2
VLAN
configured with the same id are in the same l2
AND both native VLAN
are in the same l2
if sw1--access--trunk--sw2
(If the link is up, depends on the constructor) the VLAN
configured on the sw1-access
and the native vlan
on sw2-trunk
are in the same l2
.