{"id":86,"date":"2015-12-12T23:25:36","date_gmt":"2015-12-12T15:25:36","guid":{"rendered":"https:\/\/networkingnotesblog.wordpress.com\/?p=86"},"modified":"2015-12-12T23:25:36","modified_gmt":"2015-12-12T15:25:36","slug":"playing-with-multicast-part-1","status":"publish","type":"post","link":"http:\/\/notes4it.com\/?p=86","title":{"rendered":"Playing with Multicast &#8211; Part 1."},"content":{"rendered":"<p>It really has been a long time since my previous post. I have recently received a project that deal with multicast, a old technology that is really new to me.<br \/>\nI have been googling around for resources and references, and there are indeed a lot of results that mostly focus on theory. Therefore, I decided to contribute some of my hands on experiences for anyone who is building a similar lab as I do.<br \/>\nMy lab builds from simple to complex (the difficulty is really based on my own experience only.) It starts from a playing multicast at a local area network and up to a MPLS VPN network.<br \/>\nPart 1 of the multicast post starts with 1x receiver and 1x sender in a local area network.<br \/>\nPart 2 of the multicast post is describes the lab with a router and one for each sender and receiver.<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"g9PCGbMLQL\"><p><a href=\"https:\/\/networkingnotesblog.wordpress.com\/2015\/12\/13\/playing-with-multicast-part-2\/\">Playing with Multicast &#8211; Part&nbsp;2.<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Playing with Multicast &#8211; Part&nbsp;2.&#8221; &#8212; networking notes blog\" src=\"https:\/\/networkingnotesblog.wordpress.com\/2015\/12\/13\/playing-with-multicast-part-2\/embed\/#?secret=f0dn6e6jYC#?secret=g9PCGbMLQL\" data-secret=\"g9PCGbMLQL\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><br \/>\nPart 3 of the multicast post is describes the lab with 3 routers and one for each sender and receiver.<br \/>\n(still organizing the information)<br \/>\nPart 4 of the multicast post is putting the lab from part 2 onto a MPLS VPN platform.<br \/>\n(still organizing the information)<br \/>\nLong story short, I will go straight to the part one deployment. The lab is simple; There is only 1 sender and 1 receiver within the same broadcast domain.<br \/>\n<strong>TOPOLOGY:<\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-109\" src=\"https:\/\/networkingnotesblog.files.wordpress.com\/2015\/12\/mcast-topo-local.jpeg\" alt=\"MCast-topo-local\" width=\"542\" height=\"428\" srcset=\"http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/mcast-topo-local.jpeg 542w, http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/mcast-topo-local-300x237.jpeg 300w\" sizes=\"auto, (max-width: 542px) 100vw, 542px\" \/><br \/>\nThe Sender is an Ubuntu 14.04 32bit with updated components as of 2015 Dec,02. The receiver is a Win XP 32bit machine. Both of them are equipped with 512Mb of ram and 20G of hdd. Both machines are installed with VLC as for sending and receiving. There is a Junos device as their gateway, but it can be ignored for this lab since it does not have any PIM nor IGMP configured.<!--more--><br \/>\n<strong>Configuration:<\/strong><br \/>\n&#8211; Ubuntu:<br \/>\n1. To install VLC for multicast streamer:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-114\" src=\"https:\/\/networkingnotesblog.files.wordpress.com\/2015\/12\/01-ubuntu_install_vlc.png\" alt=\"01-ubuntu_install_VLC\" width=\"785\" height=\"131\" srcset=\"http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/01-ubuntu_install_vlc.png 785w, http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/01-ubuntu_install_vlc-300x50.png 300w, http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/01-ubuntu_install_vlc-768x128.png 768w\" sizes=\"auto, (max-width: 785px) 100vw, 785px\" \/><i><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-113\" src=\"https:\/\/networkingnotesblog.files.wordpress.com\/2015\/12\/02-ubuntu-install-vlc.png\" alt=\"02-ubuntu-install-vlc\" width=\"788\" height=\"156\" srcset=\"http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/02-ubuntu-install-vlc.png 788w, http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/02-ubuntu-install-vlc-300x59.png 300w, http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/02-ubuntu-install-vlc-768x152.png 768w\" sizes=\"auto, (max-width: 788px) 100vw, 788px\" \/><\/i>2. To install the codec for it.<br \/>\n<i><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-112\" src=\"https:\/\/networkingnotesblog.files.wordpress.com\/2015\/12\/03-ubuntu-install-gstreamer.png\" alt=\"03-ubuntu-install-gstreamer\" width=\"721\" height=\"97\" srcset=\"http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/03-ubuntu-install-gstreamer.png 721w, http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/03-ubuntu-install-gstreamer-300x40.png 300w\" sizes=\"auto, (max-width: 721px) 100vw, 721px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-115\" src=\"https:\/\/networkingnotesblog.files.wordpress.com\/2015\/12\/04-ubuntu-install-gstreamer.png\" alt=\"04-ubuntu-install-gstreamer\" width=\"787\" height=\"176\" srcset=\"http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/04-ubuntu-install-gstreamer.png 787w, http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/04-ubuntu-install-gstreamer-300x67.png 300w, http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/04-ubuntu-install-gstreamer-768x172.png 768w\" sizes=\"auto, (max-width: 787px) 100vw, 787px\" \/><\/i><br \/>\n3. Network configuration:<br \/>\n<em>vi \/etc\/network\/interfaces<br \/>\n(These 7 lines for interface eth0 is pretty straight forward; however, the magic is being done as the last 2 line of post-up. They are to add the multicast subnet to eth0 and to enable the multicast function on eth0.)<\/em><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-141\" src=\"https:\/\/networkingnotesblog.files.wordpress.com\/2015\/12\/09-ubuntu-network_config.png\" alt=\"09-ubuntu-network_config\" width=\"581\" height=\"275\" srcset=\"http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/09-ubuntu-network_config.png 581w, http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/09-ubuntu-network_config-300x142.png 300w\" sizes=\"auto, (max-width: 581px) 100vw, 581px\" \/><br \/>\n4. Load a video for streaming.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-111\" src=\"https:\/\/networkingnotesblog.files.wordpress.com\/2015\/12\/05-ubuntu-command.png\" alt=\"05-ubuntu-command\" width=\"801\" height=\"56\" srcset=\"http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/05-ubuntu-command.png 801w, http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/05-ubuntu-command-300x21.png 300w, http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/05-ubuntu-command-768x54.png 768w\" sizes=\"auto, (max-width: 801px) 100vw, 801px\" \/><br \/>\nvlc: to run the VLC program<br \/>\n-vvv: to make <span class=\"s1\">verbose<\/span><br \/>\n-big_buck_bunny_1080p_h264.mov: the video to stream<br \/>\n&#8211; &#8220;&#8211;sout&#8221;: advance options for VLC output<br \/>\n&#8211; &#8220;&#8211;sout-keep&#8221;: to keep the stream alive<br \/>\n&#8211; &#8220;&#8211;ttl 5&#8221;: multicast packets have ttl 1 as default since these packets are not suppost to go over a broadcast domain, eg: ospf and vrrp; if multicast packets needs to be go over couple hops, the ttl needs to be increased.<br \/>\n&#8211; Windows XP:<br \/>\n1. Download VLC player.<br \/>\nDownload the VLC player from the following link:<br \/>\nhttp:\/\/get.videolan.org\/vlc\/2.2.1\/win32\/vlc-2.2.1-win32.zip<br \/>\nIt is not required to install the VLC player, therefore, simply run the application from the unzipped folder will be fine.<br \/>\n2. Run the Player.<br \/>\nInput: rtp:\/\/224.0.1.40:5004<br \/>\n&#8211; we are using RTP (real time transport protocol) as a method for streaming. The multicast group IP and port is the same as the advance options from the Ubuntu streaming server.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-180\" src=\"https:\/\/networkingnotesblog.files.wordpress.com\/2015\/12\/10-xp-load_video.png\" alt=\"10-XP-load_video.png\" width=\"536\" height=\"228\" srcset=\"http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/10-xp-load_video.png 536w, http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/10-xp-load_video-300x128.png 300w\" sizes=\"auto, (max-width: 536px) 100vw, 536px\" \/><br \/>\n&nbsp;<br \/>\n<strong>Observations and Results:<\/strong><br \/>\n&#8211; From Windows XP:<br \/>\nThe video is being played on the multicast receiver. From the top of the VLC player, it displays the video is received from the multicast group IP of 224.0.1.40 port 5004.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-117\" src=\"https:\/\/networkingnotesblog.files.wordpress.com\/2015\/12\/07-xp-play_via_vlc.png\" alt=\"07-XP-play_via_vlc\" width=\"531\" height=\"414\" srcset=\"http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/07-xp-play_via_vlc.png 531w, http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/07-xp-play_via_vlc-300x234.png 300w\" sizes=\"auto, (max-width: 531px) 100vw, 531px\" \/><br \/>\nThere will be a opening port for traffic from 5004. This is captured from &#8220;netstat -nab&#8221;.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-110\" src=\"https:\/\/networkingnotesblog.files.wordpress.com\/2015\/12\/08-xp-listening_port.png\" alt=\"08-XP-listening_port\" width=\"666\" height=\"78\" srcset=\"http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/08-xp-listening_port.png 666w, http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/08-xp-listening_port-300x35.png 300w\" sizes=\"auto, (max-width: 666px) 100vw, 666px\" \/><br \/>\n&#8211; From Ubuntu:<br \/>\nThe capture below shows Ubuntu is sending the data to a multicast address.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-116\" src=\"https:\/\/networkingnotesblog.files.wordpress.com\/2015\/12\/06-ubuntu-streaming.png\" alt=\"06-ubuntu-streaming\" width=\"801\" height=\"172\" srcset=\"http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/06-ubuntu-streaming.png 801w, http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/06-ubuntu-streaming-300x64.png 300w, http:\/\/notes4it.com\/wp-content\/uploads\/2015\/12\/06-ubuntu-streaming-768x165.png 768w\" sizes=\"auto, (max-width: 801px) 100vw, 801px\" \/><br \/>\nWe believe the data transfer for video streaming is successful in this lab environment using multicast method, since the sender is sending the multicast data to the multicast group IP of 224.0.1.40:5004 as shown in the snapshot above. There are no additional configuration required for the gateway to perform a multicast streaming under a local area network.<br \/>\nAlso with the minimum configuration on both sender and receivers can be easily archive a local area network streaming. Due the lack of resources, I could not afford much of the receivers for my lab. But from the observation above, I believe multiples of receivers can be received the same stream from the sender, and it does not required any additional configuration from the sender side, since the main element of the multicast is the multicast group IP address.<br \/>\nOnce again, this post is not intended to describe the theory of the multicast data transfer. It treated as a simple walk through of setting up a multicast lab with the expected results attached.<br \/>\n&nbsp;<br \/>\n<strong>Credit:<\/strong><br \/>\nI have used &#8220;http:\/\/breadcrumbing.blogspot.hk\/2015\/02\/multicast-video-streaming-with-ubuntu.html&#8221; as a guide to set my Ubuntu multicast streaming server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It really has been a long time since my previous post. I have recently received a project that deal with multicast, a old technology that is really new to me. I have been googling around for resources and references, and there are indeed a lot of results that mostly focus on theory. Therefore, I decided [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":109,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[94,111,207],"class_list":["post-86","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-networking","tag-junos-en","tag-mpls-en","tag-vpn-en"],"_links":{"self":[{"href":"http:\/\/notes4it.com\/index.php?rest_route=\/wp\/v2\/posts\/86","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/notes4it.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/notes4it.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/notes4it.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/notes4it.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=86"}],"version-history":[{"count":0,"href":"http:\/\/notes4it.com\/index.php?rest_route=\/wp\/v2\/posts\/86\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/notes4it.com\/index.php?rest_route=\/wp\/v2\/media\/109"}],"wp:attachment":[{"href":"http:\/\/notes4it.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=86"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/notes4it.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=86"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/notes4it.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=86"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}