We usually think about multicast in the context of streaming video, audio, gaming, live transmissions, but also routing protocols use multicast to send updates. Moreover, if you are going to deal with Data Center Interconnect, you gonna come across multicast trafic. But, before we go over the lab let’s get to know what is the multicast transmissions, what elements consists of and how is being used.
IP Multicast enables us transmission “one to any”. The “Any” means the hosts (multicast users) that are the members of specified multicast group. Multicast user uses particular ip address to signify that he want to joint to the group of multicast traffic.
IP Multicast uses Class D with a range of addresses 184.108.40.206 – 220.127.116.11
Within above scope we distinguish below reserved addresses
For local multicast, there is a link locally scope of multicast addresses
18.104.22.168 – 22.214.171.124. Also within this scope there are a couple of addresses that we should be aware of:
126.96.36.199 – multicast to all hosts
188.8.131.52 – multicast to all multicast routers
184.108.40.206 – multicast to all OSPF routers (updates sends by Designated Router)
220.127.116.11 – multicast to all OSPF Designated Routers ( LSA sends to Designated Router)
The TTL for these addresses is 1, thats mean they will never be send outside the link (broadcast domain)
Transient addresses utilized by applications
– global range 18.104.22.168 – 22.214.171.124
– 224.2.x.x Multicast babckbone in the Internet
Generally all addresses from the range 126.96.36.199/8 may be used locally and never should leave the LAN, but we also distinguish among them:
– addresses for site local scope 188.8.131.52/16
– addresses for organization local scope 184.108.40.206/14
IP Multicast network components
Multicast source – server that is sending out multicast traffic
Multicast routers – routers that understand multicast traffic and are able to route its further
Multicast clients – clients of the multicast traffic
Multicast routing protocol – PIM Protocol Independent Multicast, protocol uses by routers on the path of multicast traffic
Group management protocol – uses by clients to indicate that want receive multicast traffic, the protocol is IGMP Internet Group mnagement Protocol
Distribution tree – the topology with routers that participate in relying the multicast traffic to particular network segments with clients
PIM doesn’t rely on any underlaying routing protocol!
PIM Dense Mode
Push technology – assumption is that clients are densely populated and each segment of the network has the clients that want to join to the multicast group. Network segments that are not interested in of Multicast traffic just reject its. This is why this technology is called “Flood and Prune”. This technology is unefficient but is very simple to configure. Will work out in small environment
The configuration boils down to running 2 commands on each router in the multicast topology:
globally: ip multicast-routing
and on each interface: ip pim dense-mode
if the client wants to join to the group :
on the interface : ip igmp join-group [Mcast IP address]
PIM Sparse Mode
Pull technology, assumption is that clients are sparsely populated, also there is a router (or routers) in topology that is RP (Randezvous Point). The server is sending a multicast traffic to this RP, and then RP is sending further to the Clients. Sparse Mode technology is much more efficient than Dense Mode, the network is not being flooded out with unnecessary multicast traffic.
The configuration with statically assigned IP address of RP on the RP and the other routers is the same :
ip pim rp-address [RP address]
on the interface:
ip pim sparse-mode
ip igmp joinn-group [Mcast IP address]
AUTO RP – CISCO proprietary
A method for dynamic RP address assigment that relies upon Multicast groups for its operation (information about RP is spreading with use of multicast, Cisco call it “Chicken and egg” problem, cause we need RP in order to get working multicast environment, but in order assign address to RP we need multicast environment).
When we run show ip mroute we gonna see address 220.127.116.11 or 18.104.22.168 these multicast addresses are being used by Auto RP in its operation
Sparse Dense Mode technology for Auto RP
Initially sparse-dense mode technology was invented to overcome “chicken and egg” issue. All routers for Auto RP groups 22.214.171.124 and 126.96.36.199, that don’t have RP run plain Dense mode to spread information about RP. Everything else is being run in Sparse mode. But it caused a problem. If we lose the RP, then we have a “Dense flood” in entire multicast topology. To overcome this issue, Cisco has invented the command “ip pim autorp listener” and Sparse-Dense technology stopped to be needed anymore.
Besides plain ip multicast aware routers in multicast topology There are 2 kinds of AUTO RP routers that have to be deployed in order to obtain fully working AUTO RP topology.
Candidate RP – the router that wants to be RP
ip pim send-rp-announce [interface or ip address] scope [TTL]
Mapping Agent – device that spread information about Candidate RP
ip pim send-rp-discovery [interface] scope [TTL]
We may have these 2 roles : Candidate RP and Mapping Agent on the same machine. Also on each router we have to run command “ip pim autorp listener” !
Let’s lab it out !
The topology that we will be working with is simple. There are a couple of a routers in the multicast topology, also there is a server with running video stream and two Clients that are willing to watch this video. I used GNS3 as usuall, server and 2 hosts are just Windows 7 machines with running “VLC media player”. Of course the server is streaming, the hosts are plugging to the server via multicast group. We have also 2 routers required by Auto RP Mapping Agent and Candidate RP. I configured loopback 0 with address 188.8.131.52 on the Candidate RP that will be used as an Candidate RP IP address for the other routers. I aslo implemented EIGRP routing protocol across entire topology just for the sake of reachability particular routers. Interface Lo0 is also in EIGRP AS.
How to setup VLC Server and Client ?
Menu Media, choose Stream. Click Add and choose the file that you want to stream. Click Stream at the bottom, then Next. Form drop-down list choose RTP / MPEG Transport Stream and click Add. Next, input multicast group address 184.108.40.206, that video will be accessible at and stream name, leave port 5004 as is.Next window, deactivate “Activate Transcoding”. In the last window to the outpu line add “ttl=255” because default value is 0 and click Stream. We are done!
Menu Media, choose Open Network Stream and input rtp://220.127.116.11:5004, this is equivalent of command “ip igmp joinn-group 18.104.22.168” .Click Play
Configuration of Multicast Group routers
On ALL routers globally
on the interfaces
ip pim sparse-mode
Additionally on Candidate RP (R3)
ip pim send-rp-announce 22.214.171.124 scope 255
and on Mapping Agent (R2)
ip pim send-rp-discovery e1/0 scope 255
also on all Routers we have to run command :
ip pim autorp listener
First of all from now on we should be able to watch the video on the Clients machine, but also we have a few useful commands:
show ip pim interface
show ip pim neighbors – let’s see the neighborhood from the perspective of Randezvous Point
show mroute – let’s check the multicast routing information base (MRIB) , I marked entry (*,126.96.36.199) asteriks stands for ANY. For any IP address to 188.8.131.52 RP is 184.108.40.206, also we see routing for ANY to Auto RP addresses
show ip pim rp mapping – let’s use this command on R4 router that border with the Client1. We may conclude that for ANY multicast group (220.127.116.11/4) Randesvouz Point is 18.104.22.168, the source of info is Mapping Agent (R2) with interface 10.0.23.2, of course via Auto RP
and at the end let’s capture the traffic on the link between the Client 1 and R4. As we see the Client 1 with an Ip address 10.0.41.100 reports its membership to Multicast Group with IP address 22.214.171.124 with using Group Management Protocol IGMP v2