I am giving myself a little rest before returning to my CCIE Security attempt(s). This gives me time to finish off something I started some time ago; the fourth volume in the CCIE Routing and Switching, “Multicast and QoS for Cisco Networks”.
The challenge of an interesting Multicast book
Multicast is not my favorite topic, neither is QoS. When I sat in Narbik’s Bootcamp, pretty much everyone said that both were their weak areas, mine included. The reason that these two topics are generally weaker areas, is not because they are the hardest topics to grasp, but because the examples used in the books are less than stimulating.
We enable PIM, we join a group, we run a few commands to check it’s working. This is fine for the majority of the other topics, in general, if the route is in the routing table then we are happy.
It’s not so interesting for multicast, though. I wanted something that is visually stimulating.
So therein lied the challenge.
How to make a proper Multicast network in UNetLab
Originally, I pinned my hopes on using a pre-built SuSe Linux VM, but abandoned this, as getting VLC to run on it was troublesome and turned to one pre-rolled by OSBoxes.org. I installed VLC and all the requirements on it and tested it within VirtualBox, using a video file downloaded from Archive.org. The VM was then exported it from VirtualBox as a zip file and copied it to my UNetLab server – into a folder called “linux-multicast”:
We start by extracting the VDI file and converting it:
[email protected]:~# cd /opt/unetlab/addons/qemu/linux-multicast/ [email protected]:/opt/unetlab/addons/qemu/linux-multicast# ls multicast.zip [email protected]:/opt/unetlab/addons/qemu/linux-multicast# unzip multicast.zip Archive: multicast.zip inflating: multicast.vdi [email protected]:/opt/unetlab/addons/qemu/linux-multicast# ls multicast.vdi multicast.zip [email protected]:/opt/unetlab/addons/qemu/linux-multicast# /opt/qemu/bin/qemu-img convert -f vdi -O qcow multicast.vdi hda.qcow2
Now a little bit of tidying up, and making sure the permissions are set correctly:
[email protected]:/opt/unetlab/addons/qemu/linux-multicast# rm -f multicast.zip [email protected]:/opt/unetlab/addons/qemu/linux-multicast# rm -f multicast.vdi [email protected]:/opt/unetlab/addons/qemu/linux-multicast# /opt/unetlab/wrappers/unl_wrapper -a fixpermissions
Testing Multicast in UNetLab
I already had a network set up, so I just added the new VMs and set up VLC.
Here is the network:
We have a multicast server at one end and a client at the other.
VLC streaming configuration
Setting up VLC to stream, I used these steps:
Start up VLC by clicking on the Ubuntu icon, typing in “VLC” and clicking the icon when it appears:
Click on “Stream” from the menu.
Click on “Add…” to select the file for streaming:
Select the file. I chose to include a Lego Star Wars film, because, you know, Star Wars and Lego!
Click on Stream:
We want to stream it as RTP/MPEG, so select that option and click “Add”:
I am using the address 184.108.40.206, with a port of 5004 and a stream name of “Lego-StarWars”. Click Next:
Enable Active Transcoding, under the options (the screwdriver wrench icon), I selected MPEG4 and a video bitrate of 4000K and saved the options. Select “Next”:
I selected to “Stream all elementary streams”:
The next bit is VERY important. You MUST add a TTL value. VLC streams with a TTL of 1, so you need to increase it to match the network hops. In my network, there are 6 hops between the server and the client, but I could have made the TTL 100 to be on the safe side. Add “,ttl=XXX” before the final curly brace as below:
Then you can press “Stream”.
To connect the source, open VLC, select “Open Network Stream” from the Media menu:
Enter the address and click “Play”:
After a few moments, the stream should start playing on the client!
Video streaming proof
This is all well and good, but how do we know that it is, in fact, the network carrying the stream? Well, check out this video, where I use the commands “no ip pim dense” and “ip pim dense” to turn off and on PIM dense mode on the ISP-2 router. As you can see, the stream stops, and resumes once we rejoin our PIM neighbor:
I know the video quality is not great, the cropping left a little to be desired and having one of my kids walk into the room meant I removed the audio track, but that’s just me talking, as there will not be any sounds coming from the UNetLab VMs anyway.
This means it’s game-on for the book now. Not sure how long it will take, but I am feeling motivated for it again, now that we can make it a little more visually captivating.
I will make the VM available in due course.