ネットワークの基本
informationnetworksundergraduatelecture
data/lecture/information/networks/computer-networks-portal.lecture.n.md
1導入
この講義では、複数の計算機が通信回線を介してデータを交換する計算機ネットワークの基本構造を説明する。通信主体を識別するアドレス、通信手順を規定するプロトコル、パケットを宛先へ転送する経路を区別し、後続の TCP、IP、DNS、HTTP を理解するための基礎を構成する。
2構成要素と階層
ネットワークは、利用者のプログラムを実行するエンドシステム、隣接機器を接続するリンク、リンク間でパケットを中継するルータなどから構成される。エンドシステムの例には、クライアント、サーバ、スマートフォンがある。
通信機能は役割ごとの層に分割される。各層は下位層の機能を利用し、上位層へ機能を提供する。この階層化により、たとえばアプリケーションの通信規則と、パケットをネットワーク内で転送する規則を分離できる。
IPはネットワーク層でパケットを転送するプロトコル、HTTPはアプリケーション層で要求と応答の意味を規定するプロトコルである。この段階では階層化の例として位置づけ、詳細は後続の講義で説明する。
3基本用語
プロトコルとは、通信主体が交換するメッセージの構文と意味、および交換順序を規定する規則群である。
アドレスとは、ある層で通信主体または接続点を識別する情報である。アドレスの対象と有効範囲は層によって異なる。たとえば、IP アドレスはネットワーク層のインタフェースを識別し、その宛先プレフィックスはルータの転送判断に利用される。
パケットとは、ネットワークが転送する有限長のデータ単位である。パケットは、制御情報を格納するヘッダと、上位層から受け取ったデータを含む。
経路とは、送信元から宛先までパケットが通過するリンクとルータの系列である。
4パケット転送
エンドシステムは、データをパケットとしてリンクへ送出する。ルータは、受信したパケットの宛先情報と転送表を参照し、次に送出するインタフェースまたは次ホップを選択する。この処理を転送という。各ルータが転送を反復することにより、パケットは宛先方向へ転送される。
ルーティングは、ルータが利用する経路情報を形成する処理である。したがって、ルーティングは経路情報の形成、転送は個々のパケットに対する次ホップの選択として区別される。
パケット交換ネットワークでは、複数の通信がリンクを共有する。このため、パケットの遅延、順序の変化、または損失が発生し得る。どの性質をネットワーク層または上位層が保証するかは、採用するプロトコルによって異なる。
5階層化とカプセル化
送信側では、各層が上位層から受け取ったデータへ制御情報を付加し、下位層へ渡す。この処理をカプセル化という。受信側では、対応する各層が制御情報を解釈し、データを上位層へ渡す。
たとえば、HTTP のメッセージはトランスポート層へ渡され、さらに IP のパケットとしてネットワーク内を転送される。階層化は、HTTP が要求と応答の意味を規定し、IP が宛先へのパケット転送を担当するという役割分担を可能にする。
6役割の区別
- アドレスは、層ごとの通信主体または接続点を識別する。
- プロトコルは、メッセージの形式、意味、および交換手順を規定する。
- ルーティングは経路情報を形成し、転送はその情報に基づいて各パケットの次ホップを選択する。
- 階層化は、アプリケーションの意味とデータ転送の機構を分離する。
7要点
- 計算機ネットワークは、エンドシステム、リンク、ルータ、および階層化されたプロトコルから構成される。
- パケットは、各ルータによる局所的な次ホップ選択を反復して宛先方向へ転送される。
- アドレス、プロトコル、ルーティング、転送の役割を区別すると、後続の TCP と IP の役割分担を理解できる。
8次に進む講義
data/lecture/information/networks/tcp-and-ip-basics.lecture.n.md
Computer Network Fundamentals
data/lecture/information/networks/computer-networks-portal.lecture.n.md
1Introduction
This lecture explains the basic structure of a computer network, in which multiple computers exchange data over communication links. It distinguishes addresses that identify communicating entities, protocols that define communication procedures, and routes along which packets are forwarded. These concepts provide a foundation for the subsequent lectures on TCP, IP, DNS, and HTTP.
2Components and Layers
A network consists of end systems that run user programs, links that connect adjacent devices, and routers that relay packets between links. Clients, servers, and smartphones are examples of end systems.
Communication functions are divided into layers according to their roles. Each layer uses functions provided by the layer below and provides functions to the layer above. Layering separates, for example, the communication rules of an application from the rules for forwarding packets through a network.
IP is a network-layer protocol that forwards packets, while HTTP is an application-layer protocol that defines request and response semantics. They serve here as examples of layering; subsequent lectures explain them in detail.
3Basic Terms
A protocol is a set of rules that specifies the syntax and semantics of messages exchanged by communicating entities, as well as the order in which those messages are exchanged.
An address is information that identifies a communicating entity or attachment point at a particular layer. The object identified and the scope of an address depend on the layer. An IP address, for example, identifies a network-layer interface, and its destination prefix is used in a router's forwarding decision.
A packet is a finite unit of data transferred by a network. A packet contains a header carrying control information and data received from an upper layer.
A route is a sequence of links and routers through which a packet passes from its source to its destination.
4Packet Forwarding
An end system sends data onto a link as packets. A router consults the destination information in a received packet and a forwarding table to select an outgoing interface or next hop. This operation is called forwarding. Repeated forwarding at successive routers moves a packet in the direction of its destination.
Routing is the process that constructs the route information used by routers. Routing constructs route information, whereas forwarding applies that information to select a next hop for each packet.
In a packet-switched network, multiple communications share links. Packets can therefore experience delay, reordering, or loss. The guarantees provided by the network layer or an upper layer depend on the protocols in use.
5Layering and Encapsulation
At the sender, each layer adds control information to data received from the layer above and passes the result to the layer below. This process is called encapsulation. At the receiver, the corresponding layers interpret the control information and pass the data upward.
For example, an HTTP message is passed to the transport layer and is then forwarded through the network in IP packets. Layering allows HTTP to define the semantics of requests and responses while IP handles packet forwarding toward a destination.
6Distinguishing the Roles
- An address identifies a communicating entity or attachment point at a particular layer.
- A protocol defines message formats, semantics, and exchange procedures.
- Routing constructs route information, while forwarding uses that information to select the next hop for each packet.
- Layering separates application semantics from data-transfer mechanisms.
7Key Points
- A computer network consists of end systems, links, routers, and layered protocols.
- A packet is forwarded toward its destination through successive local next-hop decisions by routers.
- Distinguishing addresses, protocols, routing, and forwarding prepares for the division of responsibility between TCP and IP.
8Next Lecture
data/lecture/information/networks/tcp-and-ip-basics.lecture.n.md