Hi dears,today i read about switch that if a switch does not know destination address then it will broadcast the frame except the port from where it was received..But question is that if a switch has 24 ports and it has learnt MAC addresses of suppose first 12 ports,and if it receives frame destined for port 13 ,whome MAC address is not in its MAC address table then why it will broadcast to all ports.It should flood to ports 13-24 because it already knows MAC addresses of first 12 ports.According to me Flooding is "Broadcast to unknown ports" and Broadcast is simply "Broadcast to all ports".If i m wrong then pls tell me the difference between Flooding & Broadcast.Thank you
A broadcast will send traffic to all ports even if the MAC address has been learned.
An example of this behavior is unicast flooding and it is explained on this document
Think of "flooding" as the switch trying to find a MAC address that it does not have in the CAM table. It sends the packet out all ports in an attempt to get the packet to its destination.
A broadcast is a packet sent to 255.255.255.255, intended to be received by all listening stations. Broadcasts are propegated by switches to all ports in the same broadcast domain (usually until they hit a layer3 device).
Rate if this helps.
This should clear the confusion-
'Flooding' is a subset of broadcast where your seach begins for an unknown MAC address.The frame is flooded out of all the ports including those where a 'port-to-mac-relation' is already established.The reason being that a port can be associated with multiple MAC address.
Now broadcasting is a means to broadcast packets to all the listeners in the brosdcast domian. This is not in search for an unknown MAC address. Lets take this example- Whenever you configure 'wake-on-lan' configured in your vlan to reduce cost for your company , you are actually using the brodcast feature so that all devices in the LAN receive the packet.
I hope this clears the confusion.
Flooding is sometimes known as an unknown unicast. This happens when a switch receives a frame with a destination mac address it does not have in the CAM table. It will flood it out all ports except the receiving port of the frame. The reason why it also floods it out port 1-12 even though it has a mac-port mapping on all these ports are because a new client may have appeared behind one of these ports, but it has not learned its mac address yet.(a client needs to send frames to a switchport before the switch can learn the mac address and outgoing port.
"But question is that if a switch has 24 ports and it has learnt MAC addresses of suppose first 12 ports,and if it receives frame destined for port 13 ,whome MAC address is not in its MAC address table then why it will broadcast to all ports."
The switch does not know that the frame as destined for port 13 as this is not a field in the frame header. Hence, it must flood it out all ports.
Broadcast was explained very well in the posts before mine, and should not be hard to comprehend.
Hope this clears things up.
Personally, I disagree with the presented explanation that "flooding" is a synonymum for "unknown unicast" or a "subset of broadcast". In my understanding, flooding is a generic name for a process of replicating the received PDU to all egress ports except the ingress port. With respect to the flooding as a technical term, it does not matter whether the PDU is a frame or a packet, and it is irrelevant whether it is unknown unicast, multicast or broadcast.
Also, I do not believe it is correct to directly compare flooding to broadcasting or multicasting. Flooding refers to the specific multiplicative process of delivering the PDU. Broadcasting/multicasting refers to the process of originating these PDUs by their sender.
To the question of the original poster:
But question is that if a switch has 24 ports and it has learnt MAC addresses of suppose first 12 ports,and if it receives frame destined for port 13 ,whome MAC address is not in its MAC address table then why it will broadcast to all ports.It should flood to ports 13-24 because it already knows MAC addresses of first 12 ports
The switch must flood the frame through all ports except the incoming port because to each port of this switch, there can be many stations connected, not just a single host. Knowing a single MAC address on a particular port does not guarantee that the unknown MAC is certainly on a different port - on the contrary, it may be connected to any of our live ports. Hence the flooding of the unknown destination frame to all ports except the ingress port.
Flooding is "Broadcast to unknown ports" and Broadcast is simply "Broadcast to all ports".
In my view, flooding is a process of sending a received frame to all ports except the port it was received on. Broadcast is simply a name for a particularly addressed frame or a packet, but it does not refer to the process of delivering it.
Just to expand on something that Mr. Paluch mentioned, as I believe it goes to the root of the OP's understanding of the issue.
As noted, there may be *many* stations connected to a single port of a switch. Consider as an example, where two switches are connected together on port fa0/1 of each switch (just to pick a port at random). From the point of view of switch 1, it can see source MAC addresses from all of the stations connected to switch 2 on it's own fa0/1 port.
Thank you very much. Please call me Peter - no reason to be overly formal here.
You are completely correct. Let me give another example: let us have a simple IP phone connected to the Fa0/5, and a PC connected to this IP phone, both devices thus connected to Fa0/5 on the switch. For simplicity, let us assume that both the PC and the phone are in the same VLAN.
Assume that the switch learns about the MAC address of the PC on the Fa0/5 but it does not yet know about the IP phone's MAC address (although it is connected to the same port). If a frame destined to the IP phone is received by this switch, it would be wrong to not flood it via the Fa0/5 interface - even though there is already a MAC address of the PC learned. Not flooding the frame via the Fa0/5 would in fact prevent the switch from delivering the frame to the correct destination.
Therefore, regardless of how many MAC addresses are learned on switch ports - if a frame comes in whose recipient is unknown, the frame will be flooded out all other ports (in the same VLAN) except the ingress port.