I got an assignment to implement unicast, multicast and broadcast in UDP or TCP in java, so I searched for it and I only got UDP implementation of multicast.

My question is following:
Is there multicast possible in TCP?


In a word: NO

Multicast is a one-to-many system. TCP requires a one-to-one handshake to synchronize counters (sequence numbers) to ensure reliable transport. This cannot be done with many receivers as the sender has no way to know how many receivers there are and thus how many ACKs to expect, or what to do if one of the receivers disappears mid-transfer, etc.

Think of multicast as a speaker in a lecture hall. They don't know how many people are supposed to be there, nor care if some are late or leave. Nor do they know (or care) if everyone in the hall is hearing everything they say.

  • thanx @ Ricky, that means the teacher only expected a simulation from us , not tcp multicast exactly.
    – lazarus
    Jan 16 '15 at 7:02
  • 3
    @jazzz Maybe the teacher was checking if you would be able to judge or not whether the task was feasible or not. :) Oct 9 '18 at 6:09
  • @PerLundberg , yep maybe :)
    – lazarus
    Oct 9 '18 at 7:16

No. Even though TCP is composed of two separate sender/receiver relationships, the communication needs to be one-to-one and bidirectional.

But there are protocols which implement reliable transport over multicast, but they often use an inverse tree (publisher becomes consumer, and vice-versa) for negative acknowledgements. They are very different from TCP.

  • It's also possible that I'm misunderstanding the problem. I'm describing TCP over multicast. If the problem is to implement tunneling of multicast over TCP, then it's both possible and common. Jan 17 '15 at 19:08


If "Multicast in TCP" means "TCP over Multicast IP", the answer is NO and I can undersign the excelent answer by Ricky Beam, 5 years ago.

If "Multicast in TCP" means a multicast service or application using TCP, it is possible. It would allow a single sender (caster) to send a data stream to multiple receivers using multiple TCP connections over unicast IP. This can be done at application level, in a new transport layer or even at TCP level by an element that can be called an "Multicaster TCP proxy". Neither of these solutions would require to change the TCP/IP stack implementation.

  • 3
    That ain't multicast in the network sense we use here. I'd call it one-to-many-unicast service.
    – Zac67
    Jun 16 '20 at 12:20

well unlike all of the other answer you have already received (and probably will receive) :

YES (but nobody has done it before)

TCP is a stream-oriented protocol hence logical connections between request & response have to be established - in the case of multicast at least one important information is missing : the recipient address. Without that, quite a few algorithms (if not all) will stop working.

The solution seems to be horribly complex - one would need to incercept all (!) of the packets at the network layer on all sides (weird people call it "internet layer") hence create an entirely new protocol which actually just maps against a real one. Plus : your multicast traffic will not be routed beyond your local network border, literally all ISPs will refuse these packets.

Also : the multicast sender will have to deal with n answers to each of these transmissions - which will reduce the bandwidth gain significantly, in fact it will most definitely also increase processing time and probably overstress most NIC processing chips.

That might be a very cool experiment, though - you will need advanced programming skills and a LOT of knowledge about computer networks, operating systems and network standards :)

  • 1
    "network layer on all sides (weird people call it "internet layer")". The TCP/IP protocol Stack is not compliant with the OSI model. In the TCP/IP stack this layer is actually called the internet layer.
    – JFL
    Mar 13 '17 at 14:03
  • i ... think you might want to re-evaluate your informations. TCP operates on the transport layer and IP is on the network layer. There is no such thing like "not compliant with the OSI layer model" because the model describes the entire universe of computer network technology, even your statement itself doesnt make any sense - its like saying that cakes are not compliant with baked goods. en.wikipedia.org/wiki/OSI_model#Comparison_with_TCP.2FIP_model
    – specializt
    Mar 14 '17 at 9:09
  • 2
    TCP requires the creation of a socket connection before data can flow. That is absolutely impossible with broadcast or multicast. You'd actually need to "create an entirely new protocol" that is entirely unlike TCP. Just use IGMP.
    – Zac67
    Mar 5 '19 at 18:12
  • 2
    TCP creates a connection between exactly two endpoints. You cannot create a TCP connection from an endpoint to multiple other endpoints. What you suggest will not work.
    – Ron Maupin
    Mar 5 '19 at 19:48
  • you have obviously not even read what i wrote.
    – specializt
    Mar 6 '19 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.