cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
41177
Views
81
Helpful
13
Replies

Flooding vs Broadcast

zahid3963
Level 1
Level 1

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

13 Replies 13

Edison Ortiz
Hall of Fame
Hall of Fame

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

http://www.cisco.com/en/US/products/hw/switches/ps700/products_tech_note09186a00801d0808.shtml

Regards

Edison

tprendergast
Level 3
Level 3

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.

Cheers,

Tim

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.

Cheers!

Hi,

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.

Also:

"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.

Regards,

Kristian Brown

Peter Paluch
Cisco Employee
Cisco Employee

Dear friends,

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.

Best regards,

Peter

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.

Edwin,

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.

Best regards,

Peter

From my own understanding, flooding is sending a PDU out of all ports except the incoming port by a switch, while a broadcast is a case where a host purposely sends a PDU of all Fs.

broadcast is any frame that have destination mac is FFFF:FFFF:FFFF

flooding is forwarding tech., flooding can happened to unicast and broadcast 

Thanks for the insight.

Correction, 255.255.255.255 is the destination IP which is also for broadcast.

I think you meant to say destination MAC of all Fs?

You right 
if L3 packet  then destination IP 255.255.255.255 and destination mac FFFF:FFFF:FFFF
if only  L2 frame destination mac FFFF:FFFF:FFFF

As an side note, although 255.255.255.255 is the IPv4 address for a broadcast, and FFFF:FFFF:FFFF is the Ethernet MAC address for a broadcast, for both, all the address's bits are set to one.  Physically, an IPv4 address is 32 bits, usually shown as dotted decimal, while a Ethernet MAC is 48 bits, shown in hexadecimal, in groups of four hexadecimal digits.

Joseph W. Doherty
Hall of Fame
Hall of Fame

"According to me Flooding is "Broadcast to unknown ports" and Broadcast is simply "Broadcast to all ports"."

Incorrect.

"If i m wrong then pls tell me the difference between Flooding & Broadcast."

As the other posters have described, just because you know of a MAC for ports 1..12 doesn't mean those MACs are the only MAC on those ports.  I.e. the unknown MAC could be on any of those ports too, besides ports 13..24.

Consider if on port one, we don't have just a directly connected host, but we have another switch which has other connected hosts and/or even more switches.  Do you "see" the issue?

The real difference between flooding and broadcasting, isn't what happens physically, which is, more-or-less, the same, but the difference logically.  When "flooding" there's broadcast like (physical) behavior for a unicast MAC because we don't know what port leads to it.

When "broadcasting", we flood to all ports, because the MAC is a broadcast MAC intended to be sent to all other devices within the L2 domain.

Interestingly, since the MACs are difference, i.e. unicast vs. broadcast, unicast frames received by a host that doesn't want them are generally ignored by the NIC.  Broadcast frames are accepted by the NIC and processed by the host to see if the frame's/packet's content is of interest to the host.

BTW, I often like to remind those learning current technologies, it can be worthwhile to study original Ethernet, which was a shared medium.  I.e. all frames, were "seen" by all hosts within the same L2 domain.  Switches' (and bridges, which switches are a multi-port variant of) purpose is to decrease frame consumption of bandwidth going to hosts which have no interest in those frames.

For additional learning, you might also look into how multi-cast frames are dealt with on various switches.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card