/Unicast, Anycast, Broadcast and Multicast

Unicast, Anycast, Broadcast and Multicast

Transmitting a packet into a network can be made in four ways which are those words in the title. Every term of those four identifies a transmitting/Addressing way.

Let’s start with Unicast :


Unicasting means transmitting/Addressing a packet form a source to one destination and it’s used to deliver a packet to one and only one destination.
Assume we have a source sends a packet to destination with IP 10.0.0.3 and port 8935 so the packet passes the transmission protocol layer and get it’s protocol header (TCP or UDP) and then passes the IP layer and get’s it’s IP Header (IPv4 or IPv6) then ARP invoked to map the destination after the Ethernet header is prepended. since we are using unicast the packet passes on every host on it’s ways and the Ethernet  compares the address in the packet with the host address if they are not the same it ignores the packet, But if they are the same the packet is passed to higher level layers. the IP layer processes the IP header and the Transmission layer processes the transmission protocol layer. the next figure would illustrate what i mean.


What About Anycast?!

When you do Anycast you map the nearest destination. so what you do is :-
Send a packet with source information to many destination and depending on the received packets the nearest point is mapped.
Talking more about anycasting sadly needs good knowledge of mutlicasting which will be defined next.
DHCP is a good example of Anycasting

Broadcasting…Huh?!

First thing to know about Broadcasting is that it’s used in LANs and LANs only.
Broadcast works as follow :-
a host sends a packet putting a destination IP as a broadcast address. this makes every host on the LAN to receive the packet. the following figure would illustrate my point.

 

The Sad thing here is that you have to click the figure to see details :).
Anyway what u see here is a sender sends a packet to 192.168.42.255 which is a broadcast address and since every host detects that packet and processes the higher level headers (IP header, TCP/UDP Header). so the packets loops back into the sender.. and the Ethernet handles the packet and sends it to all hosts in the LAN. but in the 2nd host you might notice that the packet is discarded. that’s because no application was waiting on the given port. On unicast when discarding a packet the destination sends an ICMP packet to the source with Flag RST (Reset) and message “port unreachable”. on broadcasting doing so would do much damage to network. assume we have 200 host on a LAN and a host sending a broadcast packet. and only one host is waiting for it. all the rest 198 host would sent ICMP “port unreachable” packet to the source (hmmm similiar to denial of service attacks?). thats why there is no reply for discarded Broadcast packet.
On the right-most host the whole packet is processed.

Multicast…

What makes Multicast different from Broadcast is that Multicast is functional on both LANs and WANs, beside that Multicast is sending a packet from a source to specific group of hosts unlike broadcast who sends to all hosts.
Example? – Guess yea..


 

The same sad thing we had in the last section 😀
Anyway As you see in the figure the right most host binds a UDP packet to join a multicast group which has the address 224.0.1.1 what happens is that it tells the ethernet to forward that host the packets sent to that address. so when the left most host sends a UDP packet to the address 224.0.1.1 which happens to be a multicast group address (Notice that the sender doesn’t have to join the multicast group) so the Ethernet forwards the sent packet to those hosts on the multicast group which have the IP 224.0.1.1.

This article defines the terminologies in the title in too few and simple lines.. if you like reading check those

RFC- 1546 : Host Anycasting service
RFC-919 : Broadcasting Internet Datagrams ( I recommend it)
RFC-966 : Host groups: A multicast extension to the Internet Protocol (I recommend it)
RFC-988: Host extensions for IP multicasting