There are three types of traffic that we can choose from for our networks:
- Unicast – A packet sent from one host to only one other host. A hub will forward a unicast out all ports. If a switch has a table entry for the unicasts MAC address, it will forward it out only the appropriate port.
- Broadcast – A packet sent from one host to all hosts on the IP subnet. Both hubs and switches will forward a broadcast out all ports. By definition, a router will not forward a broadcast from one segment to another.
- Multicast – A packet sent from one host to a specific group of hosts. Switches, by default, will forward a multicast out all ports. A router, by default, will not forward a multicast from one segment to another.
What if we want to send a message from one source to a group of receivers? That’s when we use multicast.
Differences
between Unicast, Broadcast and Multicast
Why do you want to use multicast instead of unicast or broadcast?
Above we
have a small network with a video server that is streaming a movie and four
hosts who want to watch the movie. Two hosts are on the same LAN, the other two
hosts are on another site that is connected through a 30 Mbit WAN link.
A single HD
video stream requires 6 Mbps of bandwidth.
- When we are using unicast, the video server will send the packets to each individual host.
- With four hosts, it means the video server will be streaming 4x 6Mbps = 24Mbps of traffic.
- Each additional host that wants to receive this video stream will put more burden on the video server and requires more bandwidth from the WAN link.
- Right now, we require 2x 6Mbps of bandwidth for H3 and H4.
- When four more hosts would join on the right side, our WAN link would be completely saturated.
- The main problem with unicast traffic is that it is not scalable. Are there any advantages? It’s simple since unicast works “out of the box”.
- If our video server would broadcast its traffic then the load on the video server will be reduced, it’s only sending the packets once.
- The problem however is that everyone in the broadcast domain will receive it…whether they like it or not.
- Another issue with broadcast traffic is that routers do not forward broadcast traffic, it will be dropped.
- Multicast traffic is very efficient.
- This time we only have two hosts that are interested in receiving the video stream.
- The video server will only send the packets once, the switches and routers will only forward traffic to the hosts that want to receive it.
- This reduces the load of the video server and network traffic in general.
- When using unicast, each additional host will increase the load and traffic rate.
- With multicast it will remain the same.
Multicast
Concept
- A multicast is a packet sent from one computer to a group of hosts. A host must join a multicast group to accept a multicast. Joining a multicast group can be accomplished statically or dynamically.
- Multicast traffic is generally sent from a multicast server to multicast clients. Very rarely is a multicast packet sent back from a client to the server.
- Multicasts are utilized in a wide range of applications, most notably voice or video systems that have one source “serving” out data to a very specific group of clients.
- The key to configuring multicast is to ensure only the hosts that require the multicast traffic receive it.
When a router receives multicast traffic, somehow it must know if anyone is interested in receiving the multicast traffic. Look at the picture below:
- Above you can see the router is receiving the multicast traffic from the video server.
- It doesn’t know where and if it should forward this multicast traffic.
- We need some mechanism on our hosts that tell the router when they want to receive multicast traffic. We use the IGMP (Internet Group Management Protocol) for this.
- Hosts that want to receive multicast traffic will use the IGMP protocol to tell the router which multicast traffic they want to receive.
IGMP helps the router to figure out
on what interfaces it should forward multicast traffic but what about switches?
- Our router knows that it must forward the multicast traffic since a host used IGMP to tell the router it is interested.
- Once the multicast traffic arrives at the switch, we have another problem.
- Switches learn MAC addresses by looking at the source address of an Ethernet frame.
- Since we use multicast addresses only for the destination, how is the switch supposed to learn where to forward multicast traffic to?
The switch will “listen” to IGMP messages between the host(s) and router to figure out where it should forward multicast traffic to.
There’s also a Cisco proprietary protocol called CGMP (Cisco Group Management Protocol) that can be used between switches and routers.
The router will then be able to inform the switch where to forward multicast traffic. Unlike IGMP snooping, CGMP isn’t used much.
Addressing
Class D
addresses have been reserved for multicast. Within the Class D address space,
several ranges have been reserved for specific purposes:
- 224.0.0.0 – 224.0.0.255 – Reserved for routing and other network protocols, such as OSPF, RIP, VRRP, etc.
- 224.0.1.0 – 238.255.255.255 – Reserved for “public” use, can be used publicly on the Internet. Many addresses in this range have been reserved for specific applications
- 239.0.0.0 – 239.255.255.255 – Reserved for “private” use and cannot be routed on the Internet.
The
following outlines several of the most common multicast addresses reserved for
routing protocols:
- 224.0.0.1 – all hosts on this subnet
- 224.0.0.2 – all routers on this subnet
- 224.0.0.5 – all OSPF routers
- 224.0.0.6 – all OSPF Designated routers
- 224.0.0.9 – all RIPv2 routers
- 224.0.0.10 – all IGRP routers
- 224.0.0.12 – DHCP traffic
- 224.0.0.13 – all PIM routers
- 224.0.0.19-21 – ISIS routers
- 224.0.0.22 – IGMP traffic
- 224.0.1.39 – Cisco RP Announce
- 224.0.1.40 – Cisco RP Discovery
Multicasts Routing
A router, by default, will drop multicast traffic, unless a
Multicast routing protocol is utilized. Multicast routing protocols ensure that
data sent from a multicast source are received by (and only by) its
corresponding multicast clients.
Several multicast routing protocols exist, including:
- Protocol Independent Multicast (PIM)
- Multicast OSPF (MOSPF)
- Distance Vector Multicast Routing Protocol (DVMRP)
- Core-Based Trees (CBT)
Switch(config)# ip multicast-routing
Normally, routers build routing tables that contain
destination addresses, and route packets towards that destination. With
multicast, routers are concerned with routing packets away from the multicast
source. This concept is called Reverse Path Forwarding (RPF).
Multicast routing protocols build tables that contain
several elements:
- The multicast source, and its associated multicast address (labeled as “S,G”, or “Source,Group”)
- Upstream interfaces that point towards the source
- Downstream interfaces that point away from the source towards multicast hosts.
Conclusion
You have seen the difference between unicast, broadcast and
multicast and how multicast is far more scalable than the other two traffic
types. We also discussed the different protocols that are required to make
multicast work:
- IGMP so hosts can tell routers they want to receive multicast traffic.
- IGMP snooping so the switch knows where to forward multicast traffic.
- Multicast routing: we need a protocol like PIM that can route multicast traffic.
One of the disadvantages is that we require applications that support multicast, and we have to configure the network to support it.
No comments:
Post a Comment