cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1733
Views
0
Helpful
7
Replies

TTL & STP

vvvvvbbb123
Level 1
Level 1

Hi All,

Recently i had attended an interview in which there was a tricky question,

 PC A -- Sw 1 ---- Sw2 -- PCB

 

Let us suppose if we are not running STP and Sw1  & Sw2 have 2 links connected to each other. Unfortunately PCA pings to the wrong ip and a unicast flooding happens then whether it would cause a loop. Does TTL decrement in each interval and drop post 255 ?

7 Replies 7

Hi,

 

There would not be any loop in this case because in case of unicast flooding, the switch does not send the frame back to the port where it received. In this case Switch 2 received a frame from Switch 1, so it dont send back to Swithc 1. Also TTL is not being used here since that is a Layer 3 field and here you are talking about only layer 2 if i am not wrong.

 

Hope this helps.

 

Thanks,

Madhu

However if you had more than one link between these switches, it could end up in a loop, since the frame travel back and forth between these switches (since spanning tree is not running)

 

Hope this helps you.

 

******rating encourages particaption******

micpet1974
Level 1
Level 1

If you try to ping an incorrect IP address ARP resolution will fail,  so no ping will be send out.

If you have 2 links between the 2 switches and send out an ARP (broadcast) it would loop between the switches till the loop is broken

STP in general has nothing to do with TTL, TTL gets decreased when a packet is routed , not switched. You can go through 100's of Layer 2 switches without the TTL being decremented.

 

 

 

devils_advocate
Level 7
Level 7

It should not cause a loop.

A broadcast will not be sent out the port is was sourced from so if PC A sends a broadcast, it will pass across the link between SW1 and SW2 and will be sent out port connected to PC B. If there were other hosts plugged into SW1 or SW2 which were part of the same Vlan as PCA and PCB then they would also receive the broadcasts. 

PC A would not receive the broadcast because it was the one which sourced it. 

A loop may occur if SW1 and SW2 had a second link between them however. 

TTL is not really relevant as the frame will be forwarded at Layer 2.

As per the description "Sw1  & Sw2 have 2 links connected to each other. "

 

So the packet will come in via link 1 and go back via link 2 to be send back out on link 1, etc etc etc

My bad, I missed that part :)

In which case, yes you may end up with a loop if spanning tree was disabled.

The broadcast would come in from PC A and would be forwarded out one of the links between SwA and SwB. SwB would receive the broadcast frame and forward it back out the second link. The same would happen on SwA and the frame would end up looping.

Bear in mind a broadcast frame is local to a single vlan only so the two links between the switches would need to be either:

1. Access ports in the same vlan 
2. Trunk ports allowing the same vlans.

 

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

Without something like STP, your dual links do set you up for L2 frame looping.  TTL is only decremented per L3 hop, so looping frames will loop endlessly.

 

Review Cisco Networking for a $25 gift card