1

Rather than a configuration issue, this is a "Is this expected behaviour" question. Given the following test box (Stock Ubuntu 18.04 LTS):

+---------------------------------------+      
|           if0 172.16.0.2              |      
|                Server                 |      
|if1 192.168.0.1         if2 192.168.1.1|      
+---------------------------------------+ 

I'm running a local process that sends out multicast to 239.255.0.1 (UDP:2000) In the absence of anything else, this follows the default gateway (172.16.0.1) and exits via if0 only. I can see the iptables OUTPUT counter incrementing appropriately:

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in  out  source       destination
    4 11008 ACCEPT     udp  --  *   if0  0.0.0.0/0    239.255.0.1   udp dpt:2000

Starting smcroute with smcroute -d doesn't change this. But if I decide want the traffic to egress via if1 as well as if0 and run:

smcroute -a if0 172.16.0.2 239.255.0.1 if1

The OUTPUT counters stop and a matching FORWARD chain (once I'd created one) starts incrementing instead:

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source       destination
   31 87948 ACCEPT     udp  --  if0    if1     172.16.0.2   239.255.0.1  udp dpt:2000

So a routing decision has been made:

$ ip mroute
(172.16.0.2, 239.255.0.1)    Iif: if0 Oifs: if1  State: resolved

and tpcudmp shows the egress on both if0 and if1 as intended. But I don't understand why the local traffic must now traverse the FORWARD chain instead of OUTPUT. Is this behaviour consistent or expected?

  • Unfortunately, questions about host/server configurations are off-topic here. You could try to ask this question on Server Fault for a business network. By the way, multicast routing is very different from unicast routing, and you need to use the multicast routing protocols, e.g. IGMP and PIM. – Ron Maupin Jan 23 at 15:40
  • @RonMaupin - I checked the FAQ thoroughly before posting. If it's still off-topic, then fair enough I'll find somewhere else, but this is a question about a "lab scenario involving on-topic equipment;" on a "server operating as a router/switch/firewall;". It seemed too deep/theoretical for SF or U+L and I figured I'd get a better answer here. (I'm using smcroute in this case, rather than pimd). – SmallClanger Jan 23 at 16:01
  • Did you notice the caveat that says the manufacturer must offer optional, paid support? You do not have that. There are routing packages that you can get for your server that do offer that, but you do not seem to have one. In any case, as I explained, you cannot route multicast using unicast routing. Unicast routing is designed to get a packet to the destination, but multicast routing uses several protocols designed to prevent multicast from going where it is not wanted. It is very different. – Ron Maupin Jan 23 at 16:04
  • Yes, this is expected behavior. smcroute adds an mroute to get the traffic to flow from if0 to if1, thus it's being forwarded. – Ricky Beam Jan 23 at 19:02

Browse other questions tagged or ask your own question.