Author Topic: Using Multicast IP Addresses  (Read 1498 times)

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Using Multicast IP Addresses
« on: February 19, 2011, 04:26:43 AM »
I need help in trying to understand what is, and is not possible, when using multicast IP addresses.

The application in this case is streaming DTT over a network segment, while allowing PCs connected to other network segments access to the streams. This thread should give details
http://www.pclinuxos.com/forum/index.php/topic,87268.0.html

My set up is one main router through which PCs both access the internet and also share directories with each other.
I have available another router and an 8 port switch to add into the mix, if I can find the best means of doing what I want.

The problem is that if the streaming PC is connected to the main router, then it effectively brings that LAN segment to a stuttering halt, due to the amount of data hitting the router.

What I have in mind is that another router connected to the main router through a LAN port, might be used to separate the streaming PC from the main router thus allowing everything to work as it does presently.
Only when a PC on the main router connects to a stream would the traffic on the main router increase as that channel is streamed across it.

All very well in theory.
I do not seem to be able to implement it unfortunately!
I cannot seem to succeed in getting a PC on the main router to connect to a stream on the sub router .....  the multicast IP does not seem to be available!

So my questions revolve around ........  is what I am attempting possible?
Are there specific options in the multicast streams that are necessary if this is possible?

If this is possible, and I have the streaming options correct then I will look to hardware ......  it is possible that the router/s are not capable of handling multicast correctly.

Hopefully I have explained what I am attempting, sufficiently to allow someone to advise.

If any further info is required .....  please ask.

Thanks for reading.

regards.

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6198
Re: Using Multicast IP Addresses
« Reply #1 on: February 19, 2011, 04:48:48 AM »
have you tried connecting the switch to the main router and then have all computers connect to the switch? The switch should prevents data from being sent to the router and only send it to computers that asks for the stream.

Quote
I cannot seem to succeed in getting a PC on the main router to connect to a stream on the sub router .....  the multicast IP does not seem to be available!

I think you will have to do something called "port forwarding" on the sub router to tell it to send all incoming connections to the computer serving the streams. That sub router should have configuration options that allow you to do that.
« Last Edit: February 19, 2011, 04:55:16 AM by muungwana »
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: Using Multicast IP Addresses
« Reply #2 on: February 19, 2011, 07:22:42 AM »
Hi, thanks for the response.

have you tried connecting the switch to the main router and then have all computers connect to the switch? The switch should prevents data from being sent to the router and only send it to computers that asks for the stream.

I did try that, but the main router had to deal with all the traffic .......  the multicast traffic is just passed through the switch to the router the same as all the other traffic.

In that case the server PC was issued an IP address by the main router.

I wonder if I used a static IP on the server PC, outside of the main router segment what would be the result?

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6198
Re: Using Multicast IP Addresses
« Reply #3 on: February 19, 2011, 03:34:38 PM »

In that case the server PC was issued an IP address by the main router.

That shouldnt happen.A router connects two networks, your main router self contains your home network and the sub router should self contain its own sub network network. If the server PC is connected to the sub router, then it should get its address from the sub router and should be invincible to the main router.

Having the server on the sub router invisible should isolate its traffic from the main router and i think this is what you want. This creates a problem though, since you will have two networks, the computer that wants to listen to streams will either have to have two network cards, each connected to one network or creating some sort of a tunnel to join the sub network through the main one.

How to create a tunnel to the sub network is beyond me
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: Using Multicast IP Addresses
« Reply #4 on: February 19, 2011, 04:11:10 PM »

In that case the server PC was issued an IP address by the main router.

That shouldnt happen.A router connects two networks, your main router self contains your home network and the sub router should self contain its own sub network network. If the server PC is connected to the sub router, then it should get its address from the sub router and should be invincible to the main router.

In that case, you had said connecting with a switch and not a router.
If it had been a router then what you say above would be true.

Quote
Having the server on the sub router invisible should isolate its traffic from the main router and i think this is what you want. This creates a problem though, since you will have two networks, the computer that wants to listen to streams will either have to have two network cards, each connected to one network or creating some sort of a tunnel to join the sub network through the main one.

How to create a tunnel to the sub network is beyond me

Yes, indeed doing that does isolate the traffic ......  but it was my understanding that using a multicast address would cause it to be available throughout the network -- provided that the TTL number allowed it.

I have so far failed to achieve this ......  whether due to some misconfig or failure of the hardware to broadcast the multicast address.

regards.

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: Using Multicast IP Addresses
« Reply #5 on: February 21, 2011, 12:56:40 PM »
I finally found something that should help .....  took me a long time!   ???

It seems that not only must the router be capable of handling/passing Multicast traffic, but the NIC being used must also be set to enable multicast ....  something I was not aware of!

The first thing is to confirm the kernel is capable ..... seems it is

Code: [Select]
[user@Dell ~]$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:12:3F:78:6D:64 
          inet addr:192.168.3.11  Bcast:192.168.3.255  Mask:255.255.255.0
          inet6 addr: fe80::212:3fff:fe78:6d64/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1780 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1980 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:777039 (758.8 KiB)  TX bytes:327420 (319.7 KiB)

Next is to find out if it is enabled on a NIC

Code: [Select]
[user@Dell ~]$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.3.0     0.0.0.0         255.255.255.0   U     10     0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     10     0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         192.168.3.1     0.0.0.0         UG    10     0        0 eth0
[user@Dell ~]$

It is not.
So as root do

Code: [Select]
[root@Dell user]# route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0                                                                       
then check again to see if multicast is enabled on eth0 in this example

Code: [Select]
[user@Dell ~]$ route -n                                                                                                                     
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.3.0     0.0.0.0         255.255.255.0   U     10     0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     10     0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
224.0.0.0       0.0.0.0         240.0.0.0       U     0      0        0 eth0
0.0.0.0         192.168.3.1     0.0.0.0         UG    10     0        0 eth0
[user@Dell ~]$


As can be seen the 224.0.0.0 is now present => multicast is enabled.

I have yet to find the correct means to enable this on every boot.

.
 
« Last Edit: February 21, 2011, 04:09:14 PM by Just19 »

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: Using Multicast IP Addresses
« Reply #6 on: February 23, 2011, 12:57:37 PM »
Could you not add
Code: [Select]
route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0to /etc/rc.local?

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: Using Multicast IP Addresses
« Reply #7 on: February 23, 2011, 01:59:15 PM »
Could you not add
Code: [Select]
route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0to /etc/rc.local?

Yes I could .....  and must test it ......  the only thing troubling me was that the network connection was not coming up until after the KDE DE was up.

I will try it with the next 37 kernel (37.1) to see if the NIC is enabled earlier.

Yes, now using the newer kernel and adding the command to rc.local seems to be good.

Thanks for that.  ;)
« Last Edit: February 23, 2011, 02:16:17 PM by Just19 »