📦 Transport Layer: TCP & UDP

Role of the Transport Layer

The transport layer (Layer 4 in the OSI model) is responsible for end‑to‑end communication between applications. It provides two main services: TCP (Transmission Control Protocol) and UDP (User Datagram Protocol). Medical engineers must understand the trade‑offs to choose the right protocol for devices, image transfer, or real‑time monitoring.

TCP – Reliable, Connection‑Oriented

Properties: Connection setup (three‑way handshake), guaranteed delivery, in‑order packets, flow control, error checking, retransmission.

Use in healthcare: Transferring MRI/CT images (DICOM), accessing electronic health records (EHR), database transactions – where every byte must arrive correctly.

Advantages: Reliability, congestion control, automatic retransmission.

Disadvantages: Higher overhead, latency due to acknowledgements, slower than UDP.

UDP – Fast, Connectionless

Properties: No connection establishment, no guarantees of delivery or ordering, low overhead, checksum (optional).

Use in healthcare: Real‑time patient vitals streaming, VoIP for telemedicine, live video during surgery – where speed matters more than occasional packet loss.

Advantages: Low latency, minimal overhead, supports broadcast/multicast.

Disadvantages: No reliability; applications must handle lost packets if needed.

Port Numbers

Ports identify specific applications or services on a device. They are 16‑bit numbers (0–65535) divided into three ranges:

Common Ports in Medical / General IT

⚠️ Use secure ports whenever possible. Insecure ports could cause data risk or theft.

PortProtocolServiceUsage
20/21TCPFTPFile transfer (legacy)
22TCPSSHSecure remote access
23TCPTelnetInsecure remote access
25TCPSMTPInsecure Email sending
53TCP/UDPDNSDomain name resolution
67UDPDHCPDHCP Server
68UDPDHCPDHCP Client
69UDPTFTPTrivial FTP
80TCPHTTPInsecure Web browsing
104TCPDICOMMedical image transfer (standard)
110TCPPOP3Insecure Email retrieval
123UDPNTPTime synchronization (critical for logs)
143TCPIMAPInsecure Email retrieval
443TCPHTTPSSecure web browsing
465TCPSMTPSSecure email sending (SMTP over SSL)
587TCPSMTP SubmissionSMTP submission port
993TCPIMAPSSecure IMAP email retrieval
995TCPPOP3SSecure POP3 email retrieval
514UDPSyslogLogging from medical devices
11112TCPDICOMAlternative DICOM port
3389TCPRDPRemote desktop

When configuring medical devices or firewalls, always verify the required port numbers from the manufacturer.

Practical Tips for Medical Engineers