UDP communication
PubSub UDP is used as a brokerless, publish/subscribe protocol mainly used for direct communication between devices in networks.
Message Mapping
For PubSub UDP the message mapping UADP is supported.
Message mappings specify a specific structure and encoding for network messages. It represents the payload for transport protocols like UDP or MQTT.
Firewall
For the UDP Publisher (sending frames) firewall settings aren-t needed because it-s an outbound communication from the Publisher to the middleware.
For the UDP Subscriber (receiving frames) firewall settings are needed because it-s an inbound communication from a middleware to the Subscriber.
-
The PubSub module is listening on port 4840 for UDP frames.
-
By default the setting is "drop".
Routing schemes
Unicast communication is used to realize a targeted 1:1 communication relationship.
Multicast communication is used to realize a targeted 1:n communication relationship.
Broadcast communication is used to realize a targeted 1:all communication relationship.
In contrast to broadcasting, where only one broadcast address is used to reach all subscribers of a local network, multicast communication has a number of multicast addresses. For this is a special IP range provided, which is between 224.0.0.0 and 239.255.255.255. It can be used for communication of the actual application-specific data.
The IP range 224.0.0.0 to 224.0.0.255 is reserved for routing and maintenance protocols.
For the OPC UA PubSub Discovery, the IP address 224.0.2.14 is specified.
Broadcast addresses are not forwarded by routers, whereas multicast addresses can be forwarded, but this depends on the router and its routing configuration.
Broadcast as well as multicast is mainly operated via UDP protocol.
All hosts configured for a specific multicast address are part of a multicast group for that address. The number of hosts within a group is not limited. A host can communicate on multiple multicast groups. A host can send multicast datagrams even if there are no receivers in the specific group.
In the context of multicast routing, multicast receivers must make themselves known so that the multicast routing protocol can identify the path.
In multicast routing, receivers must register with their local router by sending what is called an IGMP membership message. This message is sent to the router, which then uses it to create and maintain the multicast distribution structure.
The IGMP membership message contains the multicast address that the recipient wants to receive, as well as its own IP address. Based on this information, the router can then identify the optimal path to the sender and send multicast data to the receiver.
When a receiver unsubscribes or is no longer interested in the multicast group, it sends an IGMP leave message to signal its departure. The router can then update the multicast distribution structure to ensure that data is sent only to those receivers that are still interested in the group.
Specifically, for a switch/router to support multicast UDP efficiently, it must have several features and properties:
-
multicast support: the switch must support multicast and be able to receive, process, and distribute multicast data.
-
IGMP snooping: The switch must support IGMP snooping to process IGMP membership messages. IGMP snooping allows the switch to forward multicast data only to the ports that have receivers connected for a specific multicast group.
-
Multicast routing protocols: The switch must be able to support multicast routing protocols such as PIM-SM, PIM-DM, or DVMRP to control and optimize multicast distribution in the network.
-
VLAN support: The switch must provide VLAN support to isolate and control traffic from different multicast groups.
-
Bandwidth management: the switch must be able to effectively manage the bandwidth for multicast data to ensure optimal network performance.
-
Multicast filtering: The switch must be able to filter multicast data based on IP addresses and port numbers to optimize and control network traffic.
Overall, the switch must be able to effectively process and distribute multicast data to ensure that multicast transmission on the network is effective and smooth.
Without IGMP support, a switch/router would distribute all multicast traffic to all ports, which can result in a high traffic load. Depending on the context, this can be problematic for heavy traffic and large networks, or it can be unproblematic in a small local network (same subnet).
In general, it can be stated that in large networks any unwanted traffic should be avoided, as it would otherwise unnecessarily burden the participants.