what is udp ip?

UDP over IP and the layers inside a network packet

UDP/IP: from a network address to an application

UDP/IP means carrying UDP datagrams inside IP packets. UDP is the User Datagram Protocol; IP is the Internet Protocol. IP supplies addressing and forwarding between networks; UDP carries separate messages between applications. The underlying IP network can use IPv4 or IPv6. A PLC sending samples to a SCADA host on a private LAN uses the same principle without requiring internet access.

UDP has no transport-level connection handshake. It also offers no guarantee of delivery, ordering or duplicate suppression. Applications decide how to handle those conditions. A small transport mechanism gives you design flexibility, rather than a promise of lower latency, security or deterministic timing.

Read the packet from the outside in

On an Ethernet link, an Ethernet frame contains an IP packet; the IP packet contains a UDP datagram; the datagram contains application data. This nesting is called encapsulation. The Ethernet protocol handles the local link. Routers forward IP packets using their destination addresses and routing tables. UDP does not choose the route. Keeping the network layers separate is useful when a healthy link carries no usable process data.

Ethernet contains IP; IP contains UDP; UDP contains application data An example pressure sample sent from PLC address 192.168.10.20 to SCADA host 192.168.10.50. Source UDP port 55000, destination UDP port 55001. Ethernet frame — delivery over the local link IP packet — source and destination IP addresses 192.168.10.20 → 192.168.10.50 UDP datagram — source and destination ports 55000 → 55001 Application payload — meaning defined by the application Sequence: 501 | Time: 12:00:00.100 | Pressure: 6.20 bar Illustrative fields; box sizes do not represent actual byte lengths.

The sequence, timestamp and pressure fields shown here belong to our example application. They are not built-in UDP fields. UDP does not know that the payload represents pressure: sender and receiver must agree on its layout, units, scaling and byte order.

The address finds the endpoint; the port finds the listener

A destination IP address identifies the receiving network interface. The destination UDP port selects the listener at that endpoint. A communication port here is a logical number, not an RJ45 connector. In the example, the PLC sends from 192.168.10.20:55000 to 192.168.10.50:55001. The receiving program must listen on the appropriate local address and UDP port 55001. These ports are illustrative, not a standard PLC service.

IP protocol number 17 identifies UDP. It does not mean “UDP port 17”; the port number is inside the UDP header. Likewise, TCP 55001 and UDP 55001 are separate endpoints. When examining network data transfer, read the address, transport and port together.

What should happen when one sample is missing?

Suppose the PLC sends a pressure sample every 100 ms. Message 501 arrives, 502 disappears, and 503 arrives. UDP does not recover 502 by itself. A live display may use 503 and flag the gap in its history. An application that must retain every sample needs acknowledgments, recovery or another transfer design.

A delayed update should not overwrite a newer reading. Design sequence handling to account for counter wraparound and device restarts. If no valid sample arrives before the application's deadline, show a communication state instead of presenting the previous value as current. The example's 100 ms interval is not a recommended setting for every process. Select the update rate and timeout from the actual process requirements. When comparing timestamps from different devices, account for clock alignment; separately track how long it has been since the receiver last accepted a valid sample.

What UDP checks, and what it leaves to your application

The 8-byte UDP header contains source port, destination port, length and checksum. Length covers the UDP header plus payload. A checksum can detect certain transmission errors, but it is not a delivery acknowledgment, encryption or peer authentication. A datagram with an invalid checksum is normally discarded before reaching the application.

IPv4 permits UDP without a checksum, although checksumming should be enabled by default. IPv6 normally requires it, with narrowly defined exceptions for particular UDP tunnels. A matching checksum does not rule out every possible corruption. Industrial cybersecurity also needs access controls and network boundaries; protected communication can use additional protocols such as DTLS or QUIC.

Keep the payload within the path's packet size

The MTU limits the IP packet size a link can carry; the smallest limit along the path matters. With a 1500-byte path MTU, IPv4 without options leaves 1500 − 20 − 8 = 1472 bytes for UDP application data. IPv6 with only its base header leaves 1500 − 40 − 8 = 1452 bytes. These are conditional calculations, not universal UDP payload limits.

VPNs, tunnels and extra encapsulation can reduce the available space. With IP fragmentation, losing one fragment can prevent delivery of the entire datagram. Match your message size to the path rather than assuming that a large local send will work end to end. Understanding how Ethernet works and the protocols carried over Ethernet helps identify where the additional overhead comes from.

Where UDP/IP fits in practice

UDP can carry live audio, game state, discovery messages and certain cyclic measurements. The decision depends on how the application handles missing or late data. In industrial networking, EtherNet/IP commonly uses 2222/UDP for cyclic implicit I/O. Review its communication model, port assignments and latency characteristics together.

Supporting UDP/IP does not establish support for a particular industrial protocol. Two devices can exchange datagrams without understanding each other's payloads. For example, Modbus TCP runs over TCP; sending the same request to a UDP port does not turn it into Modbus TCP. The EtherNet/IP–Modbus TCP comparison explains why matching connectors alone is insufficient.

When no useful data reaches the screen

Start with the Ethernet cable, link length and network switch. Check addressing, subnet and any required gateway next. Then confirm that the application is listening on the intended UDP port and that the firewall allows the traffic. A successful ping does not test the UDP application.

If a packet reaches the receiving host but no value appears, inspect message length, payload format, byte order, scaling and application filters. Silence alone does not prove that a UDP port is closed: the program might not send replies, or the reply might be lost. Separating link, transport and application checks makes industrial communication faults easier to locate.