markdown
TCP and IP Fundamentalsmd a1d8315
lecture/information/networks/tcp-and-ip-basics.lecture.n.md
Download PDF

TCP and IP Fundamentals

date2026-07-14document_iddoc_22924bf62e57626fdcb8d5f41dff3a04descriptionIPのベストエフォート型データグラム転送とTCPの信頼性のあるバイトストリームを区別し、ポート番号とカプセル化を説明する。prerequisitesネットワークの基本type講義statusactiverelateddata/lecture/information/networks/computer-networks-portal.lecture.n.md / data/lecture/information/networks/computer-network-basics.lecture.n.md / data/lecture/information/networks/dns-basics.lecture.n.md
informationnetworksundergraduatelecture
data/lecture/information/networks/computer-network-basics.lecture.n.md

1Introduction

This lecture distinguishes datagram forwarding by IPInternet Protocol from byte-stream transport by TCPTransmission Control Protocol. After establishing the limits of the service that IP provides, it explains how TCP adds reliability through sequencing and retransmission.

2Network and Transport Layers

IP is a network-layer protocol. An IP addressIP address identifies a network-layer interface, and routers use a destination IP-address prefix to forward a datagram to its next hop. RoutingRouting constructs route information, whereas forwardingForwarding transfers each datagram according to that information.

TCP is a transport-layer protocol built on IP. It identifies communication endpoints by combining IP addresses with the port numbers introduced below and supports data transfer between applications.

3IP Best-Effort Forwarding

IP carries data received from an upper layer toward a destination as an IP datagramIP datagram. IP provides a best-effort serviceBest-effort service. Network congestion, device failure, and other conditions can cause datagrams to be lost, arrive in a different order from the sending order, or arrive more than once. IP does not guarantee delivery, arrival order, or duplicate suppression.

4TCP Reliable Byte Streams

TCP provides an ordered byte streamOrdered byte stream between the two endpoints of a connection. TCP assigns sequence numbers to data and uses acknowledgmentsAcknowledgment; ACK from the receiver to determine reception status. It retransmits data that has not been acknowledged and reorders data that arrives out of order, thereby delivering an ordered sequence of bytes to the application.

TCP supports full-duplex communicationFull-duplex communication, so byte streams can be carried simultaneously in both directions. TCP does not, however, preserve the boundaries of individual messages sent by an application. An application protocol must represent its own lengths or delimiters.

5Port Numbers and TCP Connections

An IP address identifies a network-layer interface. In the context of a particular transport protocol such as TCP, a port numberPort number combines with an IP address to identify a communication endpoint. Conceptually, a TCP connection can be identified by the combination of source IP address, source port number, destination IP address, and destination port number.

A client generally uses a temporary port number, while a server waits for connections on a port number associated with the service that it provides. Port numbers allow multiple applications on a computer with the same IP address to communicate concurrently.

6Encapsulation and Communication Sequence

Application data is placed in a TCP segment, and the TCP segment is placed in the payload of an IP datagram. Adding lower-layer control information to upper-layer data in this manner is called encapsulationEncapsulation.

applicationdataTCPsegmentIPdatagram

For example, in HTTP/1.1 or HTTP/2 communication, TCP carries HTTP data as a byte stream, and IP forwards the TCP segments toward the destination as datagrams.

7Scope of Guarantees

TCP reliability concerns providing the receiver with the sender's bytes in order while the connection remains viable. It does not guarantee eventual delivery after a connection fails, nor does it guarantee that the receiving application has processed the data. TCP must not be interpreted as always delivering data.

8Key Points

  • IP forwards datagrams on a best-effort basis and does not guarantee delivery or order.
  • TCP builds an ordered, reliable, full-duplex byte stream on IP.
  • An IP address identifies a network-layer interface, while a port number identifies an endpoint in the context of a transport protocol and an IP address.
  • TCP's guarantees differ from a guarantee that an application has completed processing.

9Next Lecture

data/lecture/information/networks/dns-basics.lecture.n.md
raw .n.md をコピー
loc をコピー (filepath:line ~ line)
copy share link
copy encoded share link
path をコピー
copy share link
copy encoded share link
copy share link
copy encoded share link
タブを全て閉じる