📜 ⬆️ ⬇️

Micro issue SDSM. Preparing a laboratory for multicasts in GNS3

In this short note I want to talk about how to prepare a test stand for working with multicast.
For me, this task was very important in the preparation of the ninth edition of the Network For the Smallest.
It would be desirable not just to see tsiferki in the console, and watch the video.

As an emulator, we will use GNS.

An explanatory visual video.
')


For example, we take this network:



Here, R1 personifies an IP network, reduced to one node — that doesn't matter in general.
The main question is what will be in place of the multicast server and client.

R1 has the following configuration:
ip multicast-routing interface FastEthernet0/0 ip address 172.16.0.1 255.255.255.0 ip pim sparse-mode interface FastEthernet1/0 ip address 192.168.4.1 255.255.255.0 ip pim sparse-mode ip pim rp-address 172.16.0.1 

This is enough for him to start multicast traffic through him.

So, we have a lot of options, let's start with the least visual, but the simplest one.

1. Everything on routers


Routers can be used as servers and clients.



To do this, you configure them as if this is a normal transit router:
Server
 ip multicast-routing interface FastEthernet0/0 ip address 172.16.0.5 255.255.255.0 ip pim sparse-mode ip pim rp-address 172.16.0.1 

Customer
 ip multicast-routing interface FastEthernet1/0 ip address 192.168.4.2 255.255.255.0 ip pim sparse-mode ip pim rp-address 172.16.0.1 

In order for the Client to request a connection to the group, you need to configure a static IGMP group:
 interface FastEthernet0/0 ip igmp static-group 224.2.2.4 

On the server you can generate traffic using regular ping.
 Server#ping 224.2.2.4 repeat 50 

It is important that both Server and Client are configured to transmit multicast traffic and know who the RP is.

2. Use Qemu-host


There is such a wonderful object in GNS as Qemu-host (not to be confused with just Host). It allows you to run microvirtuals.
GNS in its arsenal has a special image for a linux based multicast. ( Download as part of the labs ).

You specify it in the GNS parameters and after that the GNS host can be transferred to the working platform.





Important: add links and include collection of dumps necessary before running Qemu .

The multicast image for Qemu contains a pre-installed VLC and a special script to start broadcasting - start.sh .

You can also configure the interfaces using the utility, and through the console check the network settings, run the ping or the script itself.



To execute the script, you must first give rights to this:
 chmod a+x start.sh 

Then run:
 ./start.sh 

Pay attention to two things:
  more start.sh vlc pixar.mp4 --sout udp://224.1.1.1:1234 --ttl 2 -L 

Group address: 224.1.1.1.
The default TTL packet here is 2. If your network contains more than one router, the multicast will not work.

But nothing prevents you from manually executing the command.
  vlc pixar.mp4 --sout udp://224.1.1.1:1234 --ttl <b>20</b> -L 

As a client, I confess, I was never able to launch Qemu - for some reason, he did not send IGMP to the network. Therefore, I used my computer.

To do this, you may need a special Microsoft Loopback Adapter interface ( click , click ).

Next, you add a Cloud (or Host) object to the working field, enter its settings and indicate your interface there. Next, on the router interface and in the IPv4 settings of the MS Loopback Adapter interface, you insist on IP from the same subnet.



There is a situation when Windows does not send IGMP-Report to the network for some reason. Then it may be useful to remove the existing routes to the network 224.0.0.0/4 and add a new one through the correct gateway:
 route delete 224.0.0.0 route add 224.0.0.0 mask 240.0.0.0 192.168.4.1 

Then start VLC on your machine and request the group 224.1.1.1 - everything should work.

3. Using Virtual Machines


If you have a sufficiently powerful computer, you can emulate all end hosts with virtual machines. The connection principle is the same as in the previous version; instead of MS Loopback Adapter, you simply forward the interface from the virtual server to the server, and in GNS you connect in the same way, knowing the interface name.

In my article on multicast, I used the third method, but in fact, if you want to work out the details, then it is quite possible to get along with the routers, given that the IDLE PC value is correctly selected.

Now you are equipped with the necessary tools to start the labs on multicast.
The new ninth edition of SDTSM , dedicated to the multicast and everything connected with it, will be released on March 31st.

Source: https://habr.com/ru/post/215883/


All Articles