Just as blue, yellow, and red are different and each has its own place within the spectrum of visible light, unicast, broadcast, and multicast are different in that each is used to achieve a specific purpose or fulfill requirements of a specific part of the communication spectrum. It is important to know where each falls within the spectrum as well as the potential applications for each.
RFC 1112 discusses multicast and goes into great detail about host extensions and multicast groups. In addition to address assignment for multicast applications and hosts, protocol methods and procedures are discussed. For example, it covers the methods by which hosts join and leave multicast groups, and it also covers group advertisements and multicast forwarding.
Unicast is used for direct host-to-host communication. When the layer 3 Protocol Data Unit (PDU, or packet) is formed, two layer 3 IP addresses are added to the IP header. These are the source and destination IP addresses. They specify a particular originating and receiving host. After the layer 3 PDU is formed, it is passed to layer 2 to create the layer 2 PDU, or frame. The frame consists of all the previous layers' headers in addition to the layer 2 header. With an Ethernet frame, for example, the two 48-bit source and destination MAC addresses are specified in the layer 2 header. Other protocols such as IEEE 802.5 (Token Ring) and FDDI also have headers that contain specific host source and destination addresses.
Unicast communication is used when two hosts need to exchange data with only each other and are not concerned with sharing the data with everyone. A MAC address must uniquely identify a host. No two MAC addresses, on a single network, can be the same. Therefore, unicast capitalizes on the unique MAC address of each host. With the specific address, any source host should be able to contact the destination host without confusion.
One of the caveats with unicast communication is that the source host must know or be able to learn what every destination MAC is for every station it wishes to communicate with. In order to figure out which MAC address the source should send frames to, it uses an ARP request, as explained in the following section. The normal operation is that the host has a default gateway assigned for use when the logical destination address does not reside on the same subnet as the source host. Figure 8.1 depicts how unicast traffic works on the same subnet.
Figure 8.1: Unicast communication
Of course, unicast traffic may differ inside an internetwork interconnected by routers. In those circumstances, you will remember that the transmitting client needs to know the IP (and MAC) addresses of the default gateway.
The unicast process occurs between two hosts only. A single destination address is used to ensure that data is sent to only one host. This could be client-to-server, server-to-client, or peer- to-peer. It doesn't matter, so long as the frames are addressed to a unicast address. So when one host wants to send data to multiple hosts or all the hosts on the same network segment, things have to change. That is where multicast and broadcast communication comes in.
Now that you have a good understanding of unicast, we can discuss the principle of broadcast communication on networks. Whereas unicast messages target a single host on a network (unicastcommunication can be compared to sending an e-mail to a friend; the mail is addressed to the friend, and it is sent from you), broadcast messages are meant to reach all hosts on a broadcast domain (such as when you shout out to everyone in the room, 'Who wants an ice cream?'). Figure 8.2 depicts a broadcast message sent from Host X to all machines within the same broadcast domain.
Figure 8.2: Broadcast message on a network
A good example of a broadcast message is an Address Resolution Protocol (ARP) request. When a host has a packet, it knows the logical address of the destination. To get the packet to the destination, the host needs to forward the packet to a default gateway if the destination resides on a different IP network. If the destination is on the local network, the source will forward the packet directly to the destination. Because the source doesn't have the MAC address it needs to forward the frame to, it sends out a broadcast, something that every device in the local broadcast domain will listen to. This broadcast says, in essence, 'If you are the owner of IP address 192.168.2.3, please forward your MAC address to the source address of this frame. Each device will answer a request for its own IP address, but a correctly configured router can serve as a proxy as well, with the process of Proxy ARP.
This brings up another good point: Broadcasts can cause problems on networks. Because the broadcast frame is addressed to include every host, every host must process the frame. CPU interruption occurs so that the frame can be processed. This interruption affects other applications that are running on the host. When unicast frames are seen by a router, a quick check is made to identify whether the frame is intended for the host. If it isn't, the frame is discarded.
Multicast is a different beast entirely. At first glance, it appears to be a hybrid of unicast and broadcast communication, but that isn't quite accurate. Multicast does allow point-to-multipoint communication, which is similar to broadcasts, but it happens in a different manner. The crux of multicast is that it enables multiple recipients to receive messages without flooding the messages to all hosts on a broadcast domain.
Multicast works by sending messages or data to IP multicast group addresses. Routers then forward copies of the packet out every interface that has hosts subscribed to that group address. This is where multicast differs from broadcast messages. With multicast communication, copies of packets are sent only to subscribed hosts.
The difference between multicast and unicast is comparable to the difference between mailing lists and spam. You subscribe to a mailing list when you want to receive mail from a specific group regarding specific information-for example, a Cisco User Group mailing list. You expect to get messages only from other members of the group regarding topics related to the user group. In contrast, spam is unsolicited mail that arrives in your inbox. You aren't expecting it from the sender, nor are you likely to be interested in the content.
Multicast works in much the same way as a mailing list. You (as a user) or an application will subscribe to a specific IP multicast group to become a member. After you become a member of the group, IP multicast packets containing the group address in the destination field of the header arrive at your host and are processed. If the host isn't subscribed to the group, it will not process packets addressed to that group. Refer to Figure 8.3 for a reference on how multicast works.
Figure 8.3: Multicast communication
Broadcast and multicast traffic can occur at different layers of the OSI model. Each is characterized by the fact that they are addressed to a wide group of hosts, and are not usually acknowledged. At the data link layer, broadcasts manage useful concepts such as ARP. At the network layer, they may be responsible for routing updates or server requests. At the application layer, they may be misused. E-mail broadcasts are often referred to as spam.
The key to multicast is the addressing structure. This is key because all communication is based on addressing. In unicast communication, there is a unique address for every host on a network. In broadcast communication, a global address that all hosts will respond to is used. Multicast uses addressing that only some hosts will respond to. The next section covers multicast addressing in detail.