Switching Loop Created by empty CAM and a unicast frame?
aderon
Member Posts: 404 ■■■■□□□□□□
in CCNA & CCENT
Why does a MAC address not being in the CAM table cause a unicast frame to create a switching loop?
From my book:
"Frames that already had a destination address recorded in the MAC address table of the switches are forwarded to the port they're associated with; however, any broadcast, multicast, and unicast not in the CAM are now in an endless loop"
The broadcast and multicast part I understand, but I'm having a little trouble understand the unicast example. Here's the scenario I've created to try to understand what exactly is happening.
#### PART 1
Frame comes into switch 1 from host
Source MAC of host (11-11-11-11-11-11) is logged in CAM table
Frame leaves out all ports in switch 1 except the one the frame came in on
#### PART 2.a
Frame comes into switch 2 from switch 1
Source MAC of host (11-11-11-11-11-11) is logged in CAM table
Frame leaves out all ports in switch 2 except the one the frame came in on
#### PART 2.b
Frame comes into switch 3 from switch 1
Source MAC of host (11-11-11-11-11-11) is logged in CAM table
Frame leaves out all ports in switch 3 except the one the frame came in on
#### PART 3.a
Frame comes into switch 3 from switch 2
Switch 3 becomes confused because it sees 11-11-11-11-11-11 coming in from a different port than what it currently has in its CAM table
#### PART 3.b
Frame comes into switch 2 from switch 3
Switch 2 becomes confused because it sees 11-11-11-11-11-11 coming in from a different port than what it currently has in its CAM table
At this point, I don't know what a switch does and I think that's why I don't understand how a loop would form in this scenario. Could anyone enlighten me as to what a switch would do in this scenario?
From my book:
"Frames that already had a destination address recorded in the MAC address table of the switches are forwarded to the port they're associated with; however, any broadcast, multicast, and unicast not in the CAM are now in an endless loop"
The broadcast and multicast part I understand, but I'm having a little trouble understand the unicast example. Here's the scenario I've created to try to understand what exactly is happening.
#### PART 1
Frame comes into switch 1 from host
Source MAC of host (11-11-11-11-11-11) is logged in CAM table
Frame leaves out all ports in switch 1 except the one the frame came in on
#### PART 2.a
Frame comes into switch 2 from switch 1
Source MAC of host (11-11-11-11-11-11) is logged in CAM table
Frame leaves out all ports in switch 2 except the one the frame came in on
#### PART 2.b
Frame comes into switch 3 from switch 1
Source MAC of host (11-11-11-11-11-11) is logged in CAM table
Frame leaves out all ports in switch 3 except the one the frame came in on
#### PART 3.a
Frame comes into switch 3 from switch 2
Switch 3 becomes confused because it sees 11-11-11-11-11-11 coming in from a different port than what it currently has in its CAM table
#### PART 3.b
Frame comes into switch 2 from switch 3
Switch 2 becomes confused because it sees 11-11-11-11-11-11 coming in from a different port than what it currently has in its CAM table
At this point, I don't know what a switch does and I think that's why I don't understand how a loop would form in this scenario. Could anyone enlighten me as to what a switch would do in this scenario?
2019 Certification/Degree Goals: AWS CSA Renewal (In Progress), M.S. Cybersecurity (In Progress), CCNA R&S Renewal (Not Started)
Comments
-
aderon Member Posts: 404 ■■■■□□□□□□I guess hypothetically the following could cause a loop. Is this what a switch would do? Does it just update the CAM table with the new port that the source MAC is coming in on?
#### PART 3.a
Frame comes into switch 3 from switch 2
Switch 3 sees 11-11-11-11-11-11 coming in from a different port and updates the CAM table to reflect the change
Frame leaves out all ports in switch 3 except the one the frame came in on
#### PART 3.b
Frame comes into switch 2 from switch 3
Switch 2 sees 11-11-11-11-11-11 coming in from a different port and updates the CAM table to reflect the change
Frame leaves out all ports in switch 2 except the one the frame came in on2019 Certification/Degree Goals: AWS CSA Renewal (In Progress), M.S. Cybersecurity (In Progress), CCNA R&S Renewal (Not Started) -
james43026 Member Posts: 303 ■■□□□□□□□□Why does a MAC address not being in the CAM table cause a unicast frame to create a switching loop?
From my book:
"Frames that already had a destination address recorded in the MAC address table of the switches are forwarded to the port they're associated with; however, any broadcast, multicast, and unicast not in the CAM are now in an endless loop"
The broadcast and multicast part I understand, but I'm having a little trouble understand the unicast example. Here's the scenario I've created to try to understand what exactly is happening.
#### PART 1
Frame comes into switch 1 from host
Source MAC of host (11-11-11-11-11-11) is logged in CAM table
Frame leaves out all ports in switch 1 except the one the frame came in on
#### PART 2.a
Frame comes into switch 2 from switch 1
Source MAC of host (11-11-11-11-11-11) is logged in CAM table
Frame leaves out all ports in switch 2 except the one the frame came in on
#### PART 2.b
Frame comes into switch 3 from switch 1
Source MAC of host (11-11-11-11-11-11) is logged in CAM table
Frame leaves out all ports in switch 3 except the one the frame came in on
#### PART 3.a
Frame comes into switch 3 from switch 2
Switch 3 becomes confused because it sees 11-11-11-11-11-11 coming in from a different port than what it currently has in its CAM table
#### PART 3.b
Frame comes into switch 2 from switch 3
Switch 2 becomes confused because it sees 11-11-11-11-11-11 coming in from a different port than what it currently has in its CAM table
At this point, I don't know what a switch does and I think that's why I don't understand how a loop would form in this scenario. Could anyone enlighten me as to what a switch would do in this scenario?
This could only happen if STP in some form wasn't active on the switches. As STP is the only thing that prevents switching loops from forming. Anytime the same MAC address that is already stored in CAM, comes in on a port that the MAC address isn't associated with in the CAM, then the old entry in CAM is erased and a new entry is created. This is of course for Unicast traffic, multicast and broadcast traffic are handled a bit differently. -
aderon Member Posts: 404 ■■■■□□□□□□james43026 wrote: »Anytime the same MAC address that is already stored in CAM, comes in on a port that the MAC address isn't associated with in the CAM, then the old entry in CAM is erased and a new entry is created.
Awesome that's exactly what I was wondering. Clears things up! Thanks2019 Certification/Degree Goals: AWS CSA Renewal (In Progress), M.S. Cybersecurity (In Progress), CCNA R&S Renewal (Not Started)