I'have a little problem, i cannot see if this is a loop.
If all ports )including the trunks) are in the VLAN1 im seeing a loop! no?
Ok, and imagine a second case:
The two trunk ports (well are four ports but you understand, no?) are in the vlan 20(p.e.) and the ports of th sw's connected to the RT1 are in the default vlan. Is this a loop? The trunk have as native vlan the 20.
Please let me know if thats a loop, i really cant see!
Thanks to all!!!
Let us look at the first case. What are the routers doing? Are they routing layer-3, or are they bridging layer-2?
If they are routing layer-3, you can ignore the switches in the topology. There is a loop only if RT1 routes the IP packet to RT2, and RT2 routes the IP packet to RT1. The packet will get dropped as soon as it's reached its TTL limit. Not good for the packet, but OK for the rest of the network.
If the routers are bridging layer-2, yes there is a loop. The thing about layer-2 is there is no time-to-live, so packets can go round a loop forever, gradually building up. But this is not a problem as long as all the devices are running Spanning Tree, which they should be. Spanning Tree avoids loops by automatically blocking ports until there are no more loops.
In your second case, again there is no loop. Even if the routers are bridging. That is because VLAN 20 only runs between SW1, RT2, and SW2. RT1 does not go anywhere near VLAN 20. The fact that the trunks are using VLAN 20 as native does not enter into the argument, it is still VLAN 20.
Maybe your confusion can be cleared up: the concept of a native VLAN is only local to each link individually. SW1 and RT2 say to each other "we have a VLAN in common, VLAN 20. Let us not bother to tag VLAN 20 packets. If I send you a packet with no tag, you should understand it is for VLAN 20. And vice versa."
This means, for eaxample, that the link SW1-RT2 could have VLAN 20 as native, while RT2-SW2 uses VLAN 30 as native. If SW1 get a packet from RT2 that is not tagged, it treats it as if it were tagged VLAN 20. Once the packet is in the SW1 box, it is on VLAN 20, regardless of whether it came in tagged or not.
What is important is that for each link, each end should agree on which VLAN is the native. If they don't, then you can have problems.
Does that make it any clearer?