TCP and UDP
TCP and UDP are transport protocols that carry application data between programs on IP networks. TCP provides an ordered, reliable byte stream, while UDP sends separate messages with fewer built-in delivery services.
itNetworking | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Intro
TCP and UDP
IP moves packets between hosts. Applications need one more layer to deliver data to the right program. TCP and UDP provide that transport layer.
Both protocols use port numbers. A port number identifies an application endpoint within a host. The combination of IP addresses, transport protocol, and port numbers lets a host direct incoming data to the correct socket.
TCP and UDP make different promises. That difference shapes application design, troubleshooting, and performance.
The central choice
TCP provides a reliable, ordered byte stream. It establishes a connection before application data flows. Sequence numbers identify bytes in the stream. Acknowledgments report received data. Retransmission repairs detected loss. Flow control protects a receiver, while congestion control adapts sending to network conditions.
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://www.rfc-editor.org/rfc/rfc9293.html
Supports
- TCP as a reliable, in-order, bidirectional byte-stream service
- Connection identity, setup, sequence numbers, acknowledgments, retransmission, checksums, flow control, and connection states
- TCP port multiplexing and lack of preserved application message boundaries
- TCP acknowledgments describe transport receipt rather than application completion
- https://www.rfc-editor.org/rfc/rfc768.html
Supports
- UDP datagram model and minimal transport service
- Source port, destination port, length, and checksum header fields
- UDP length and checksum behavior
- https://www.rfc-editor.org/rfc/rfc1122.html
Supports
- UDP as non-guaranteed datagram delivery
- UDP application responsibility for reliability, reassembly, flow control, and congestion avoidance when required
- UDP support for multicast and broadcast delivery
- https://www.rfc-editor.org/rfc/rfc8085.html
Supports
- Congestion-control requirements for applications and protocols using UDP
- UDP guidance for message sizes, reliability, checksums, middlebox traversal, and ports
- Need to handle loss, duplication, reordering, and delay above UDP
- https://www.rfc-editor.org/rfc/rfc8095.html
Supports
- Comparison of services provided by TCP and UDP
- UDP endpoints, message orientation, lack of flow control, and application-supplied transport features
- https://www.rfc-editor.org/rfc/rfc7605.html
Supports
- System, User, and Dynamic port ranges
- Separate transport-specific assignments and limits of port-based application identification
- https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml
Supports
- Current Service Name and Transport Protocol Port Number Registry
- Assigned service names and protocol-specific port records
- https://github.com/sindresorhus/awesome
Supports
- PCAPTools as the relevant curated list under Networking
- https://github.com/caesar0301/awesome-pcaptools
Supports
- Curated discovery of Wireshark, tcpdump, Scapy, and Ostinato
- Packet capture, inspection, construction, replay, and traffic-generation use cases
- https://www.wireshark.org/docs/wsug_html/
Supports
- Wireshark packet analysis, protocol field inspection, and TCP and UDP filtering
- https://www.tcpdump.org/manpages/tcpdump.1.html
Supports
- tcpdump command-line packet capture and filter expressions
- https://scapy.readthedocs.io/en/latest/
Supports
- Scapy packet construction, sending, capture, decoding, and interactive use
- https://ostinato.org/docs/
Supports
- Ostinato packet crafting, editing, replay, traffic generation, graphical interface, and API
