PDA

View Full Version : Help needed to understand few things about switches.


Aman
03-26-2008, 08:24 AM
Hi Todd,
I have read your book, its great.
I have few doubts if you could help me with them.

1) Say i have a switch with 8 ports, PC's are attached to all the
ports. Now the switch dosent have the macaddress of any PC. Say
port 1 has PC1, port 2 PC2 and so on till 8 ports. PC1 sends a
message for PC5. Now switch was not having macaddress of any PC so
it broadcasts, now it comes to know about PC5 macaddress and sends
the message to it. Here i want to know does the switch comes to
know about macaddress of all the PC's or only of PC5. If only of
PC5 then does it mean it will keep broadcasting untill it has the
macaddress of all the PC's? Please explain?

2) Also i want to know, say that switch now has macaddress of all
the 8 PC's. If i put PC 3 in port of PC 5 and PC 5 in port of PC
3. But switch in its macaddress memory has macaddress of PC3
assigned to port 3 and say PC1 sends message to PC 3. What will
happen in this case?

It will be great if you can help me Todd to clear my doubts.

lildeezul
03-27-2008, 06:48 AM
1) when the switch gets the imcomming frame, it looks at the source mac address, since pc1 sent the frame, then it will add pc1 mac address to its table. then it will forward that frame on all other ports except back to pc1. so when pc5 recieves this frame, it will probably send back a ack to pc1. Since the switch looks at the source mac, it will ee if it has an entry for pc5, since it doesnt it adds pc5 mac, and forwards the port on all ports except the one it came from.
Hopefully this clears this up. Switches look at the source mac.

2)if the switch nows all he mac address,and you switch pc3 and pc5, when pc3 sends a fram to the switch, it will see that the mac address from pc3 is from a different lacation, or ethernet port 5, so looking at the source, it will update its table, by adding pc3 mac address to port 5. and if pc5 send a frame, it will add pc5 mac address to port 4. and then forwards the frame on all active ports except the one it came from

This is all becuase the switch looks at the source mac, not the destination mac.

hope this helps you out

Aman
03-29-2008, 04:52 AM
Hi,

In second case i wanted to know what if PC1 sends a message for PC3, not PC3 sending a message?

Please help. Will the frame get dropped or what?