1

I am trying to forward a UDP Unicast message so that it cant be received by multiple computers. Can anyone point me in the right direction for how to accomplish this?

Here are the details:

Network message flow There are a series of sensors that transmit telemetry via UDP Unicast to 192.168.0.1:45000. Each sensor has an IP address in 192.168.100.0/24. They are connected to a router that routes these messages via 192.168.110.0/24. I can't easily change the configuration on any of these devices. Even if I could, they are embedded devices with a limited set of features. In particular, they don't support Multicast.

I receive these messages using a Cisco ISR 4331 router. I am trying to route the UDP telemetry messages from the sensor to a number of computers for displaying the data. Currently, these are all on subnet 192.168.120.0/24. I do control the configuration of this router as well as the display software. The displays can subscribe to Multicast without any issues.

Right now, I have no problem recieving the telemetry on any one single display computer, but I really need to see the data on all display computers simultaneously.

Here are things that I have tried with no success:

  1. Using NAT to translate 192.168.0.1 to 192.168.120.255 (directed broadcast)
Router-ISR4331#config t
Router-ISR4331(config)#int gi0/0/0
Router-ISR4331(config-if)#ip address 192.168.110.253 255.255.255.0
Router-ISR4331(config-if)#ip nat outside
Router-ISR4331(config-if)#exit
Router-ISR4331(config)#int gi0/0/1
Router-ISR4331(config-if)#ip address 192.168.120.253 255.255.255.0
Router-ISR4331(config-if)#ip nat inside
Router-ISR4331(config-if)#ip directed-broadcast
Router-ISR4331(config-if)#exit
Router-ISR4331(config)#ip nat inside source static udp 192.168.0.1 45000 192.168.120.255 45000
Router-ISR4331(config)#exit

My intent is for messages inbound from the outside network with destination address 192.168.0.1 to be translated to a directed broadcast destination on the inside network (192.168.120.255). My understanding is that I need to use a source translation because "source" and "destination" are named from the perspective of a message originating from the inside network bound for the outside network. When I show the translation table, this is what I see:

Router-ISR4331(config)#show ip nat trans

Inside local = 192.168.120.255 Inside global = 192.168.0.1

The router accepts my NAT command without complaining, but it doesn't seem to actually perform any forwarding. If I replace 192.168.120.255 with 192.168.120.1 (or another display computer address), the router properly forwards the messages. I have ip directed-broadcast turned on, but it doesn't seem to be willing to broadcast.

  1. Using NAT to translate 192.168.0.1 to 239.0.1.1 (Multicast)

The router will not allow this command at all:

Router-ISR4331(config)#ip nat inside source static udp 192.168.0.1 45000 239.0.1.1 45000

I have found instructions for "Multicast Service Reflection" https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus3548/sw/multicast/6-x/b_Nexus_3548_Multicast_Guide/b_Nexus_3548_Multicast_Guide_chapter_0100.html#id_65481. In the introduction, it claims that it can translate "Unicast or Multicast to Unicast or Multicast", but in the more detailed description, it says that Unicast to Multicast translations are not supported. It seems that this is not a viable solution.

I am not experienced with configuring Multicast, so some of this article is beyond me. It seems that regular NAT doesn't work with Multicast, and Multicast Service Reflection can't forward an incoming Unicast message to a Multicast group.

  1. Re-broadcast

I can receive the UDP telemetry message on 192.168.120.1, then re-broadcast it to 192.168.120.255. This works, but it introduces undesireable latency between displays, and it also puts Display Computer #1 in a critical role. Part of the reason for having multiple display computers is redundancy in case one of them crashes. I just mention this solution to say that I do realize that it can be done, but it doesn't meet the final system requirements.

  1. Port Mirroring

I have tried using a mirror port and another switch to achieve what I want. It sort of works, but has some major drawbacks. I NAT the UDP telemetry message to one computer (192.168.120.1), then mirror outbound messages on that port to another port that I then connect via a switch to all the other Display Computers. On the display computers, I set the interface in promiscuous mode to receive messages addressed to 192.168.120.1. This does actually work, but it seems very hacky. Also, the display computers still need to perform other functions on the network, which necessitates two network interfaces with two physical connections on each Display Computer. Also, the promiscuous mode settings are not easily portable across different Display Computer hardware. This is the leading solution right now, but it isn't great.

Any suggestions would be appreciated.

3
  • Your application doesn't use multicast when it should and you're looking for a solution on the network level. The clean approach would be to re-broadcast or re-unicast, all on the application layer and all off topic here, sadly. If you need it really fast and highly available you should check out (clustering) load balancers, but we cannot recommend any products here.
    – Zac67
    Commented Aug 7, 2023 at 12:31
  • You're on the right path with #2... unicast to multicast translation. In either case, you need an application to receive the unicast stream and turn it into something else -- multicast, or multiple unicast streams. (reminds me of shoutcast back in the day, for audio streaming)
    – Ricky
    Commented Aug 7, 2023 at 19:18
  • Depending on the application you need to replicate, you need some kind of software server to accept the incoming data and resend it to 2 destinations (or more). For simple protocols that are basically one way UDP like Netflow, I have used an application called Samplicator for that kind of job. That's not a recommendation for your need, just an example that has worked for a similar kind of problem for me. Commented Aug 8, 2023 at 3:53

0