1
[Hello guys firstly this question I myself have migrated from stack exchange to here as networking related questions are not supposed to be asked there. So please don't mark as duplicate. I am the owner of both.]
In the below diagram (click on the url below.consider the first diagram only for this question) assume switch has 2 interfaces E0(left) and E1(right) and Fred is connected to P0 of Hub and Wilma to P1 of Hub and switch to port P3 of Hub and assume MAC address table of switch is EMPTY.
Now assume Fred is sending a frame to Wilma, which is also on the E0 interface. As per my understanding, first Fred sends to Port0 of Hub and Hub should simply flash it to P1 and P3 ports simultaneously. Since the MAC table is empty along with Wilma even Barney and Betty should receive the frame and it will be discarded by them .When Wilma sends a reply back to Fred via port P1 of Hub,it will be again flashed to P0 as well as P1 and now mac table will be updated with Wilma against E0.So next time onwards,anything to Wilma will be filtered by switch.
But actually what happens is at the first time itself the frame is discarded at interface E1 of switch. Wilma then reply back to Fred via port P1 of Hub, saying I received the frame. Even before this reply from Wilma the switch decides to filter the frame because it received the frame on port E0, and it knows that Wilma’s MAC is also located out E0.
So what is confusing me is how switch intelligently comes to know Wilma is also on E0 interface. Because mac address table is empty in the beginning. [Guys please don't assume that its because of the reply message from Wilma to port P1 of Hub which is going to be forwarded to E0 of switch 1 and mac table is updated. Because I verified this on cisco packet tracer, frame at E1 is discarded even before reply from Wilma].
Sorry in advance for being so lengthy. Its just for easy understanding for readers. Consider only the first diagram in the website.[SWITCH FILTERING DECISION]: http://www.ciscotests.org/ccna.php?part=3&page=2
If there is a duplicate on the other site, perhaps you could flag it and have it migrated. – None – 2013-06-28T11:18:03.493
Could you inline the diagram into the question please – None – 2013-06-28T11:18:43.467
@axrwkr>I have added link in the end of the question.Pasting the link again here.http://www.ciscotests.org/ccna.php?part=3&page=2
– Poorvi – 2013-06-28T11:26:21.267It doesn't know. It just pushes the packets to the whole range for everybody to know. – Piotr Kula – 2013-06-28T11:35:09.283
@ppumkin>so even you are agreeing to my understanding that for the first time it will flood and next time onwards,it starts filtering..am i right?But in the actual scenario,even for the 1st time ,it just filtersout.I tried the topology in packet tracer and got to know this. – Poorvi – 2013-06-28T11:45:57.620
Well I realised that diagram is using HUB's - HUB's suck and I dont really remember how they work. Switches will just "flood" as you say – Piotr Kula – 2013-06-28T11:50:46.700
@ppumkin>i have uploaded the packettracer file (x.pkt) in this link.You can check out and can see the same what i have mentioned in question.http://ge.tt/7PCPVTk.
– Poorvi – 2013-06-28T12:00:19.903Are your computers doing ARP before sending packets to each other? Or are you sending packets in a "brute force" manner (that is - without arping first)? – prateek61 – 2013-06-28T12:26:32.243
@prateek61>nO.only ICMP packets are captured. – Poorvi – 2013-06-28T12:34:07.757
Hmm, I just tested this in a lab scenario and I got the correct behavior. Could this be an artifact of packet tracer? – prateek61 – 2013-06-28T12:44:43.837
@prateek61>OK in that case it may be a drawback of packet tracer.Thanks prateek for trying out with actual switches and hub and giving a solution.This is just for summarizing my understanding.So you meant to say,flooding first and once the mac table is updated,switch will filter out for any further transmissions.correct na? – Poorvi – 2013-06-28T12:54:50.600
Yea - so the first packet caused a flood - then after a response the switch started filtering packets on the same side of the switch. – prateek61 – 2013-06-28T13:03:40.533