The OpenNET Project / Index page

[ новости /+++ | форум | wiki | теги | ]

Поиск:  Каталог документации

Next Previous Contents

3. Using channel tools

Channel service tools are useful when you want to stream multiple videos at the same time and enable the clients to change channel (i.e. switching from one stream to another) easily without typing IP addresses, but just using the interface and selecting a channel number.

The channel service tool that you will use depends on your network :

Warning : the network tools that will be presented in this section have been tested only under Linux. We cannot guarantee they will work with other operating systems.

3.1 Multicast and miniVLCS

If your network supports multicast, you will use the mini VideoLAN Channel Server (miniVLCS) as your channel tool. This program sends the parameters the VideoLan Clients need in order to receive the streams.

Building miniVLCS

Download the file miniVLCS-0.1.2.tar.gz from the Network download page.

Then uncompress the archive and build the program :

% tar xvzf miniVLCS-0.1.2.tar.gz
% cd miniVLCS-0.1.2
% make

It creates an executable program named vlcs.

miniVLCS configuration

Edit the configuration file vlcs.conf.

The first line corresponds to channel 0, the second line corresponds to channel 1, the third line to channel 2, and so on.

In each line, put what you would type on the command line of vlc, except for the first line I: nostream. It means that you don't stream anything in channel 0.

For example, if you have two multicast stream :

your vlcs.conf file would be :
I: nostream
udp:@239.255.12.42
udp:@239.255.12.43

Run mini-vlcs

As normal user, do :

% ./vlcs

You must restart vlcs every time you change the configuration file vlcs.conf.

vlc configuration

The simplest solution is to use the interface of vlc : click on "Net", select "Channel server", write its IP address or DNS name.

Then, you see a new section "Network Channel" on the interface. Select the desired channel and click on Go!.

3.2 Broadcasting and VLANserver + VLANbridge

Overview

If your network doesn't support multicast but supports VLANs, you will use a VLAN server. If your network supports multicast, you will certainly NOT want to use this solution, because it is far more complex to set up and far more dangerous for the stability of your network. The VLAN solution has been tested on "our" previous network (the network of the student residence of the Ecole Centrale Paris) and worked well. But we now have a new network which supports multicast, so the VLAN solution is not tested nor developed any longer.

In order to explain the VLAN solution, I will take the example of our previous network. This network had :

As an MPEG stream needs a bandwith between 4 to 9 Mbit/s, we could send multiple streams on our 155 Mbit/s backbone, but each student had a 10 Mbit/s connection and therefore could only receive one stream at the same time. It was out of the question to send the stream to machines that didn't want to receive it.

So the idea was to broadcast each stream in a VLAN, different from the regular VLAN. In order for a student to change channel, we needed to change his machine of VLAN. This was the job of the VLAN Server. The VLAN Server received the requests of the VideoLAN Clients and changed the machines of VLAN by sending SNMP requests to the switches.

We had the following VLAN configuration :

The VLAN Server has a big database with the correspondence between the MAC addresses of the clients Ethernet network cards and the couple (switch, port) where the client machine is connected. The VLAN Server can fill up his database and update-it automatically by sending regularly SNMP requests to the switches.

Let's take the following scenario as an example :

  1. The VLAN configuration is as described above. All the computers are in VLAN 2, which is the regular VLAN. Three streams are broadcasted repectively in VLAN 3, 4 and 5.
  2. A student wants to watch channel 1. He starts vlc on its machine and select channel 1. When he clicks on "Go!", his computer sends a request to the VLAN Server. This requests contains the MAC address of his Ethernet card and the number of the channel that he wants to watch.
  3. The VLAN Server receives this request. It looks into its database to see on which switch and which port of the switch the computer of the student is plugged. It also knows that channel 1 is broadcasted in VLAN 3. It sends an SNMP request to the switch telling it to put the port on which the student's computer is plugged in VLAN 3.
  4. The student's machine receives the stream and his vlc displays it.
  5. The student can select channel 2 or 3. His computer will send a new request to the VLAN Server. The VLAN Server will send another SNMP request to the switch telling it to put the port of which the student's computer is connected is VLAN 4 or 5.
  6. When the student quits vlc, his machine sends another request to the VLAN Server asking to be put back to the regular VLAN (i.e. VLAN 2). The VLAN Server receives the request and put the port back to VLAN 2.

There is another problem : we want the machines in VLAN 3, 4 and 5 to be able to communicate with all the other machines. If you have a good router, you can configure it so as to let the different VLANs communicate but without letting the streams broadcasted by vls in a VLAN go to the other VLANs. But if you have a bad router like our old router, you need to develop another solution, called VLANbridge. The idea of the VLANbridge is to have a machine under Linux connected to all the VLANs. This machine is configured so as to let the different VLANs communicate, but it prevents the streams broadcasted by vls in a VLAN go to the other VLANs.

The two versions of the tools

First, the VideoLAN team developed a VLAN Server and a VLANbridge in C language. When a computer asked to go to channel 1, it sent a request to the VLANserver. The VLANserver received this request, put the port of the switch on which the computer was connecter in VLAN 3, and transmitted this information to the VLANbridge so that the computer was "bridged" with the other VLANs. The advantage of this solution was that the computer hosting the VLAN Server could be a pretty modest machine. But the VLAN Server was quite complex (all his database was written from scratch in C language !), it segfaulted too often, there was regularly MAC addresses missinig in its database, and there was sometimes some problem of communicaction with the VLANbridge.

Then, in year 2001, the VideoLAN team started to develop a new set of tools for the VLAN solution.

Marc Ariberti and Boris DorХs developped a new VLANbridge, called vlb-linux. The idea was that the VLANbridge sould learn the changes by itself, and didn't need to communicate with the VLAN Server. They developed a patch for the bridge module of the Linux kernel, so as to serve the needs of VideoLAN. You just have to tell to the VLANbridge the MAC addresses of the vls, and it automatically learn which machine is in which VLAN, and enable the VLANs to communicate but it firewalls the packets that have the source MAC address of a vls.

Marc Ariberti and Christophe Massiot developed a new VLAN Server, called mini VLAN Server. The idea was to use a PostgreSQL database instead of the "hand-made" database of the VLAN Server. The mini VLAN Server is written in PHP (for the heart and all the requests to the SQL database) and C (for the reception of the requests from the VideoLAN Clients). It is more reliable, it never segfault, but it needs a decent machine (we used a 300Mhz Pentium with 128Mo de RAM for a network of 1000 machines). The mini VLAN Server cannot be used with the old VLANbridge.

Eventually, if your network doesn't support multicast, we advise you to use the mini VLAN Server. And if you router cannot make the VLANs communicate with filtering functions (in order to stop the streams broadcasted to go from a VLAN to another), we advise you to use vlb-linux.

Installation and configuration of the VLAN solution

mini VLAN Server

The installation of the mini VLAN Server is not explained here because it is quite complex and we think that most of you have a network with multicast support. You can download it from the Network download page. The "tarball" contains an "INSTALL" file with instructions in French. If you want to use the mini VLAN Server and don't understand French, you can ask for help in the mailing-list vlcs@videolan.org.

vlb-linux

You can download this version of the VLANbridge from the Network download page. The "tarball" contains an file "vlanbridge-help" with detailled explainations in English of the idea behind the VLANbridge and, at the end, the instructions to install and configure this version of the VLANbridge.

vlc configuration

The simplest solution is to use the interface of vlc : click on "Net", select "Channel server", write its IP address or DNS name.

Then, you see a new section "Network Channel" on the interface. Select the desired channel and click on Go!.


Next Previous Contents


Спонсоры:
Слёрм
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2020 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру