What is casting?
Casting in computer networks means transmitting data (stream of packets) over a network. There are three types of casting, which include:
- Unicast transmission
- Broadcast transmission
- Multicast transmission
What is Unicast?
In computer networking, unicast is a one-to-one transmission from one point in the network to another point; that is, one sender and one receiver, each identified by a network address.
Unicast transmission, in which a packet is sent from a single source to a specified destination, is still the predominant form of transmission on LANs and within the Internet. All LANs (e.g. Ethernet) and IP networks support the unicast transfer mode, and most users are familiar with the standard unicast applications (e.g. http, smtp, ftp and telnet) which employ the TCP transport protocol.
What you need to know about Unicast
Addressing
- Unicast relies on unique addresses or identifiers to specify the recipient. In IPv4, these addresses are typically 32-bit values, while in IPv6, they are 128-bit values. The source device uses the destination’s address to route and deliver the data packet to the correct destination.
Point-to-Point
- Unicast communication is point-to-point, meaning it establishes a one-to-one connection between the sender and the receiver. It is the most straightforward and widely used form of communication.
Efficiency
- Unicast communication can be less efficient than other communication paradigms like multicast or broadcast, especially when there are multiple recipients for the same data. This is because it requires a separate data packet for each recipient.
Address Resolution
- In Ethernet networks, the Address Resolution Protocol (ARP) is used to map an IP address to a physical MAC (Media Access Control) address. This is essential for delivering unicast packets within a local network segment.
Routing
- In wide area networks (WANs) and the Internet, routers play a crucial role in forwarding unicast packets to their destination. Routers use routing tables to determine the best path to reach the destination based on the destination IP address.
Reliability
- Unicast communication is highly reliable because the sender knows exactly who the intended recipient is. If the recipient is reachable and responsive, the sender can expect a reliable delivery of data.
Security
- Unicast communication provides a level of security because data is directed to a specific recipient. Unauthorized devices are less likely to intercept the data. However, encryption and other security measures are often necessary to protect the content of unicast messages.
Examples
- Web browsing: When you access a website, your computer sends unicast requests to the web server, which responds with unicast packets containing the requested web pages.
- Email: When you send an email, it is typically delivered to the recipient’s email server using unicast communication.
What is Multicast?
Multicast is the term used to describe communication where a piece of information is sent from one or more points to a set of other points. In this case there is may be one or more senders, and the information is distributed to a set of receivers (there may be no receivers, or any other number of receivers).
Multicast can be more efficient than unicast when different groups of receivers need to see the same data. Multicast is the technique used in Internet streaming of video or audio teleconference, sending an email to a particular group of people, etc.
What you need to know about Multicast
Addressing
- Multicast uses special IP addresses, known as multicast group addresses, to identify groups of devices interested in receiving specific data. In IPv4, multicast addresses range from 224.0.0.0 to 239.255.255.255. In IPv6, multicast addresses are identified by the prefix ff00::/8.
One-to-Many or Many-to-Many
- Multicast enables one-to-many or many-to-many communication models. The sender sends a single copy of the data, and routers in the network replicate and forward the data to all devices that have joined the multicast group. This results in efficient data distribution to multiple recipients.
Efficiency
- Multicast is highly efficient for delivering data to multiple recipients, especially when there are a large number of recipients interested in the same data. Instead of sending separate copies to each recipient (as in unicast), the sender only sends one copy to the multicast group.
Membership
- Devices that want to receive multicast data must join the multicast group by expressing their interest. In Internet Group Management Protocol (IGMP) for IPv4 and Multicast Listener Discovery (MLD) for IPv6, devices notify routers that they want to receive data for a specific multicast group. Routers keep track of group memberships.
Routing
- Multicast routing protocols, such as Protocol Independent Multicast (PIM), are used by routers to efficiently forward multicast traffic to all members of the multicast group. These protocols determine the best path for multicast data propagation.
Applications
- Multicast is used in various applications, including live video streaming (e.g., IPTV), online gaming, audio conferencing, and content distribution networks (CDNs). It’s particularly useful for delivering content to a large number of users simultaneously.
Scalability
- Multicast is highly scalable, making it suitable for scenarios where a single sender needs to reach a large and dynamic group of receivers. This scalability is achieved by minimizing the sender’s and network’s workload.
Reliability
- Multicast offers reliability, as the sender only needs to transmit data once. If a member of the multicast group experiences issues (e.g., packet loss), it can request retransmission, ensuring that data reaches all intended recipients.
Security
- Multicast traffic can be challenging to secure because it is distributed to multiple recipients. To address security concerns, techniques like source authentication and encryption are used to protect the integrity and confidentiality of multicast data.
Unicast vs Multicast: Key Differences
Aspect | Unicast | Multicast |
---|---|---|
Recipients | One-to-One | One-to-Many or Many-to-Many |
Destination Addressing | Single destination IP address | Group destination IP address |
Traffic Congestion | Generates more network traffic as each message is sent separately to each recipient. | Reduces network congestion as multiple recipients share the same multicast transmission. |
Efficiency | Less efficient for one-to-many communication due to multiple copies of data. | More efficient for one-to-many communication as data is replicated only when necessary. |
Scalability | Less scalable for large-scale multicast communication. | Highly scalable for a large number of recipients. |
Packet Duplication | No duplication of data packets. | Data packets may be duplicated at the sender’s end. |
Network Load | Higher network load due to individual transmissions. | Lower network load as data is sent once and shared among recipients. |
Transmission Control | Requires individual connections and acknowledgment for each recipient. | Simplified control with group management and no need for individual acknowledgments. |
Application | Commonly used for point-to-point communication. | Used for broadcasting data to multiple recipients simultaneously (e.g., streaming, video conferencing). |
IGMP (Internet Group Management Protocol) | Not relevant for unicast. | Used to manage multicast group memberships in IPv4 networks. |
Security | Typically more secure, as data is sent only to the intended recipient. | Potential security concerns due to data being accessible to multiple recipients in the group. |
Error Handling | Errors affect only the specific unicast transmission. | Errors may affect multiple recipients if they share the same multicast transmission. |
Examples | Email, HTTP, FTP, Voice calls (when one person talks to another) | IPTV, Streaming video, Online gaming (when multiple players receive the same game data simultaneously) |