cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
628
Views
15
Helpful
7
Replies

What happens if STP is enabled in a switch but there is no loop

Pooja V
Level 1
Level 1

What happens if STP is enabled in a switch but there is no loop?

 

Eg. Consider that I have two computers, 2 L2 switch and 2 Routers

1. PC1--> L2 Switch 1--> Router 1 [192.168.1.2/25]--> Router 2 [192.168.2.1/26]--> L2 Switch 2--> PC2

2. Both the switches are not interconnected to each other so there is no loop but STP is enabled in both the switches

3. I know that if STP is enabled then both the switches send BPDU every 2 seconds so BPDU will go to the Router and PC but both the devices will drop the BPDU frame as they cannot process that multicast frame

4. My Question is who will be the Root switch and what happens. How does it work? Please help me

 

5. I have one more question with the same setup [PC1--> L2 Switch 1--> Router 1 [192.168.1.2/25]--> Router 2 [192.168.2.1/26]--> L2 Switch 2--> PC2]

PC1 can ping PC2 but arp will not go directly to PC2 from PC1.

6. PC1 checks its arp cache and if there is no entry then it does an AND operation and it tries to reach DG because PC 2 is in a different network.

7. PC 1 should know the MAC address of DG to communicate with it so again it does ARP. So ARP doesn't reach the server directly

8. My interview asked "Why ARP Cannot reach the server directly if it is in a different network"

9. I told him that the server is in a different network so ..and moreover Router cannot pass the broadcast packet. 

10. He agreed to it but he said that we have few more reasons. What are they?

11. I am unable to find an answer 

Pls help me.. this is my first post. I am really interested in networking and I am ready to learn new things Pls do help me.. 

 

7 Replies 7

Hello,

 

as for the first question: the root switch is only relevant in relation to VLANs. Since your VLANs are not physically connected (switch 1 doesn't 'see' switch 2), there is no root bridge election. Each switch is the root for the local VLANs...

 

Does that make sense ?

 

I'll look at the second question...

Ya.. So Switch 1 will think that it is the Root switch and it will continue to send the BPDUs and switch 2 does the same. Am I correct?

Hello,

 

exactly. In your scenario, if there are no loops, you best turn STP off (no spanning-tree vlan x).

Thank u so much. It was an interview question. Whenever you get time, Pls do help me with the second question.

Hello,

 

as to the second question, basically, ARP is a layer 2 protocol, so it cannot do any layer 3 related operation.

 

Below is what I think a pretty good explanation on how ARP works. It can only send broadcasts to (as you already said) directly connected neighbors. PC2 is not directly connected, so it can never reach it directly:

 

https://www.tummy.com/articles/networking-basics-how-arp-works/

"It can only send broadcasts to (as you already said) directly connected neighbors. PC2 is not directly connected, so it can never reach it directly"

I gave the same answer but they were asking for few more reasons

=- I told them that PC 2 is in a different network so we cannot send ARP directly and the Router will not pass the broadcast packet.

=- They were asking for more reasons 

Hi

Not sure what answer they are looking for, but one thing may be that pc1 will not send an arp request to pc2. Arp requests are only send to local hosts ( hosts in the same subnet according to the netmask ). So  pc1 will only send an arp to the router address.

/Mikael 

Review Cisco Networking for a $25 gift card