-1

Suppose I have a layer 2 managed switch which can be programmed to have multiple VLANs. Lets say there are 2 configured VLANs as of now vlan-1 and vlan-2. I also have a linux machine with 2 ethernet NIC with each ethernet port 1 and 2 connected to a switch port belonging to VLAN 1 and VLAN 2 respectively. My server is connected to vlan-1 and client connected to vlan-2 .The server is a multicast server. How should I configure the linux machine(to act as a router) to route multicast packets from vlan-1 to vlan-2 and vice-versa?

The diagram of the network looks similar to this (with both the switches being same but with two vlan) enter image description here

and since igmp snooping is not turned on the switch it will broadcast packets hence it will reach the linux machine.

  • You should configure a multicast routing stack, but there isn't any short answer to this general question "how". – drookie Mar 08 '19 at 15:34
  • I understand that my question is vague but can you help me? what do you mean by "multicast routing stack"? I also saw that for routing multicast packets we need software like pimd or mrouted. will that suffice the requirement? @drookie – Tamil Selvan Mar 09 '19 at 05:51
  • "_and since igmp snooping is not turned on the switch it will broadcast packets hence it will reach the linux machine._" No, multicast does not broadcast. Broadcast must be handled by every device in the broadcast domain, but multicast is sent to a group and is only handled by hosts subscribing to the multicast group. Also, multicast routing is very different than unicast routing, and it uses IGMP to communicate with the multicast router that must be configured for multicast routing. – Ron Maupin Mar 09 '19 at 06:55
  • I do understand that multicast is not broadcast but I read somewhere that switches which are not smart enough(i.e. igmp snooping not turned on in a layer 2 switch) will consider multicast traffic like broadcast traffic and will send packets to all its ports. But anyways apart from that.... How do I configure a linux box to route multicast packets. all I found was regarding unicast routing. – Tamil Selvan Mar 09 '19 at 07:25
  • @RonMaupin could you suggest me a tutorial where I can learn about configuring a linux box to work as multicast router to forward traffic between two vlans? – Tamil Selvan Mar 09 '19 at 08:27
  • Unfortunately, asking for a tutorial suggestion is off-topic here: "_product, service, or learning material recommendations_." There really are a lot of quality hits you get if you search for it on the Internet. – Ron Maupin Mar 09 '19 at 18:02

1 Answers1

0

You can use SMCRoute, it's available in most Linux distributions. Either use the client tool or add a line as follows to your /etc/smcroute.conf:

mroute from eth0 group 225.1.2.3 source 192.168.1.42 to eth1 eth2
troglobit
  • 211
  • 1
  • 3