Skip to content · ⁨コンテンツへスキップ⁩

Communication and internet technologies · ⁨通信およびインターネット技術⁩

A-Level Computer Science · ⁨A-Level コンピューター科学⁩ · Topic 14 · ⁨トピック 14⁩

View Slides · ⁨查看幻灯片⁩ Train · ⁨練習する⁩
Video lesson for this topic · ⁨このトピックのビデオレッスン⁩ Open the video page · ⁨動画ページを開く⁩
11:17

プロトコルが必要な理由

2台のコンピュータが会話したいと考えていますが、片方がデータを某方向に送信し、もう片方が全く異なる形で期待しています。結果はごちゃ混ぜになり——二人の人が…話しているようなものです。

English narration · English + 中文 subtitles burned in · ⁨英語ナレーション・英語+中文字幕 burning-in⁩

14.1

Why protocols are needed · ⁨プロトコルが必要な理由⁩

Syllabus · ⁨シラバス⁩
English
Candidates should be able to: Notes and guidance
Show understanding of why a protocol is essential for communication between computers
Show understanding of how protocol implementation can be viewed as a stack, where each layer has its own functionality
Show understanding of the TCP/IP protocol suite Four Layers (Application, Transport, Internet, Link) Purpose and function of each layer Application when a message is sent from one host to another on the internet
Show understanding of protocols (HTTP, FTP, POP3, IMAP, SMTP, BitTorrent) and their purposes BitTorrent protocol provides peer-to-peer file sharing
日本語
受験者は以下的能力を備えているべきである: メモおよびガイドライン
コンピュータ間の通信にプロトコルが不可欠である理由に対する理解を示す
プロトコルの實現をスタックとして理解する能力 各レイヤーが独自の機能を持つこと
TCP/IP プロトコルスイートの理解 4つのレイヤー(アプリケーション, トランスポート, インターネット, リンク) 各レイヤーの目的と機能 インターネット上で1つのホストから別のホストへメッセージを送信する際の应用程序
プロトコル(HTTP, FTP, POP3, IMAP, SMTP, BitTorrent)とその目的の理解 BitTorrent プロトコルはピア・トゥ・ピアファイル共有を提供する

Source: Cambridge International syllabus · ⁨出典: Cambridge International シラバス⁩

English

A protocol 协议 is a set of rules for how devices communicate. Both ends must follow the same rules, or one side's signals are meaningless to the other. Protocols define the format of the data (where addresses and payload sit), the order of messages (who speaks first, when to acknowledge), the meaning of each message, the timing (timeouts, retransmits), and what to do on error. Without an agreed protocol, communication fails — like two people speaking different languages with no translator.

"Explain why protocols are essential for communication between computers" (three marks). (1) A protocol is a set of rules agreed by both the sender and the receiver; (2) without it the two computers would interpret the data differently (format, order, meaning of each part), so the message could not be understood; (3) it allows computers of different types and manufacturers to communicate, because everyone implements the same standard. Mention what the rules cover: the format of the data, the order of messages, error detection and recovery, and speed or timing.

日本語

プロトコルとは、デバイスが通信する際の一連のルールです。両端は同じルールに従わなければならず、そうでなければ片方の信号は他方にとって意味をなしません。プロトコルはデータの形式(アドレスとペイロードの位置)、メッセージの順序(誰が最初に話し、いつ応答するか)、各メッセージの意味、タイミング(タイムアウト、再送信)、およびエラー時の対応を定義します。合意されたプロトコルがない場合、通信は失敗します。これは通訳なしで異なる言語を話す二人の人々と同様の状態です。

「なぜプロトコルがコンピュータ間の通信に不可欠であるかを説明せよ」(3点) (1) プロトコルとは、送信者と受信者の間で合意された一連のルールであること;(2) 存在しない場合、2台のコンピュータはデータを異なった解釈をする(形式、順序、各部分の意味)ため、メッセージを理解できず、(3) 異なる種類やメーカーのコンピュータ間での通信を可能にするため、皆が同じ標準を実装するからである。ルールがカバーする内容として言及すること:データの形式、メッセージの順序、エラー検出と回復、速度やタイミング。

同じルールに従う2つのデバイス:形式、順序、タイミング、エラー時の対応
プロトコルとは共有されたルールであり、形式、順序、タイミング、エラーを含む
Vocabulary · ⁨語彙⁩ Train · ⁨練習する⁩
English 日本語
protocol/ˈprəʊtəkɒl/ プロトコル
14.1

Layered protocols · ⁨レイヤードプロトコル⁩

English

Networking is complex, so it is split into layers 层, each with one focused job, talking only to the layer above and below. Benefits: modularity 模块化 (replace one layer — say Ethernet with Wi-Fi — without touching the others), standardisation (vendors interoperate), and abstraction 抽象 (you ignore details handled elsewhere). The internet uses the TCP/IP protocol suite 协议栈 (4 layers).

日本語

ネットワークは複雑であるため、レイヤーに分割され、それぞれが単一の focused な業務を行い、上下のレイヤーとのみ通信します。メリット:モジュール化(1つのレイヤー、例えばEthernetをWi-Fiに交換しても他のレイヤーに触れずに済む)、標準化(ベンダー間の相互運用性)、抽象化(他で処理される詳細を無視できる)。インターネットではTCP/IP プロトコル・スイート(4層)を使用します。

14.1

TCP/IP protocol suite · ⁨TCP/IPプロトコル・スイート⁩

English
Layer Purpose Examples
Application what the user program does HTTP, FTP, SMTP, IMAP
Transport end-to-end delivery between processes TCP, UDP
Internet routing packets between networks IP
Link sending bits over the physical medium Ethernet, Wi-Fi

The purpose of each layer, as the mark scheme words it. Application layer: provides the protocols that user applications use (HTTP for the web, SMTP for email) and the interface between the application and the network; it produces the data to be sent and passes it to the transport layer. Transport layer: establishes the end-to-end connection, splits the data into packets (segments) and adds port numbers and sequence numbers; on receipt it reassembles the packets in order and requests any that are missing (TCP), or sends without those guarantees (UDP). Internet layer: adds the source and destination IP addresses to form IP packets (datagrams) and routes them across networks via routers; it does not guarantee delivery. Link layer: adds the MAC addresses and error-check bits to form a frame and transmits the bits over the physical local network (Ethernet or Wi-Fi) through the network interface card. "Complete the stack" means these four, in this order, from the top: Application, Transport, Internet, Link.

"Describe how the TCP/IP suite is applied when a message is sent from one host to another" (five marks). At the sender the message passes down the stack: (1) the application layer produces the data using a protocol such as HTTP or SMTP; (2) the transport layer splits it into packets and adds a header with the port numbers and a sequence number; (3) the internet layer adds a header with the source and destination IP addresses and chooses the route; (4) the link layer adds the MAC addresses of the next device and sends the frame over the physical link. Routers along the way read the internet-layer header and forward each packet. At the receiver the frame passes up the stack: each layer removes and acts on its own header, the transport layer reassembles the packets in sequence-number order and asks for any that are missing, and the application layer presents the message. The same protocol at each layer at both ends is what makes the exchange work.

Application layer

The application layer 应用层 gives services to user programs and defines the protocols they speak (HTTP for web, SMTP for email). This is where a programmer most often works.

Transport layer

The transport layer 传输层 delivers data end-to-end between processes, identified by port numbers 端口号. Two protocols:

  • TCP 传输控制协议 — connection-oriented 面向连接: sets up a connection, ensures all data arrives in order, retransmits lost packets 数据包, controls flow. Reliable but with overhead. Used by HTTP, HTTPS, SMTP, FTP.
  • UDP 用户数据报协议 — connectionless 无连接: sends and forgets, with no acknowledgements or ordering. Low overhead, no guarantees. Used for streaming, DNS and gaming, where speed beats reliability.

Internet layer

The internet layer 网络层 carries packets between hosts using IP. Each packet has a source and destination IP address IP地址, and routers 路由器 forward it onward. It does not guarantee delivery — that is TCP's job.

A home router does this job for your house: it reads each packet's destination address and sends it on towards the internet, and back to the right device.

Before the router reaches the wider internet, a modem 调制解调器 connects the home to the internet provider over the provider's cable or phone line. Its lights show the link is up and online.

Link layer

The link layer 链路层 sends bits over one physical link (Ethernet, Wi-Fi). It adds a frame header with MAC addresses MAC地址 and handles medium access (e.g. CSMA/CD 载波侦听多路访问/冲突检测 on Ethernet).

On a wired local network, a switch 交换机 joins many devices together. Each device plugs into a port with an Ethernet cable (an RJ45 plug), and the switch uses the MAC addresses in each frame to send it only to the correct port.

The physical link can be a copper wire, a radio signal (Wi-Fi), or a fibre-optic cable 光纤. In a fibre-optic cable, the bits travel as flashes of light through very thin strands of glass, which is fast and carries data a long way.

A radio link can reach much further. A satellite dish 卫星天线 sends and receives radio signals to and from a satellite, carrying data to places that wired links cannot easily reach.

日本語
階層 目的 例
Application ーザープログラムが行うこと HTTP, FTP, SMTP, IMAP
Transport プロセス間のエンドツーエンドの配送 TCP, UDP
Internet ネットワーク間パケットのルーティング IP
Link 物理媒体上のビット送信 Ethernet, Wi-Fi
4段のスタック:Application, Transport, Internet, Link。左側は送信が下向き、右側は受信が上向き。各レイヤーに例示されたプロトコル
TCP/IPプロトコル・スイートの4層

各レイヤーの目的(採点基準の表現による)。 Application layer: ユーザーアプリケーションが使用するプロトコルを提供(WebにはHTTP、メールにはSMTPなど)、アプリケーションとネットワークのインターフェースとなります。送信すべきデータを作成し、transport layerに渡します。Transport layer: エンドツーエンド接続を確立し、データをパケット(セグメント)に分割し、ポート番号とシーケンス番号を追加します。着信時、パケットを順序通り組み立て、欠落しているものがある場合は要求します(TCP)。または、それらの保証なく送信します(UDP)。Internet layer: IPパケット(ダイアグラム)を形成するため送信元と宛先のIPアドレスを追加し、ルータを介してネットワーク間でルーティングします。配送を保証することはできません。Link layer: MACアドレスとエラーチェック用ビットを追加してフレームを形成し、ネットワークインターフェースカードを介して物理的なローカルネットワーク(EthernetまたはWi-Fi)上でビットを送信します。「スタックを完成させる」とは、この4つをこの順で、最上位からApplication, Transport, Internet, Linkと述べることを意味します。

TCP/IPスタックへのメッセージ送信:アプリケーションのメッセージはポートとシーケンス番号を含むTCPヘッダーによってラップされ、次に送信元と宛先IPアドレスを含むIPヘッダーによってラップされ、最後にMACアドレスとチェックフィールドを含むフレームヘッダーによってラップされます。受信側は逆順にそれらを剥ぎ取ります
エンキャプスレーション:各レイヤーは上からのレイヤーから受け取ったものに独自のヘッダーを追加するため、ケーブル上のビットは4種類の情報を含みます。受信側はそれを1レイヤーずつ取り除きます

「メッセージが1台のホストから別のホストへ送信される際、TCP/IPスイートがどのように適用されるかを記述せよ」(5点)。 送信側において、メッセージはスタックを下に向かいます:(1) application layerはHTTPやSMTPのようなプロトコルを用いてデータを作成します;(2) transport layerはそれをパケットに分割し、ポート番号とシーケンス番号を含むヘッダーを追加します;(3) internet layerは送信元と宛先IPアドレスを含むヘッダーを追加し、経路を選択します;(4) link layerは次のデバイスのMACアドレスを追加し、物理リンク上でフレームを送信します。途中のルータはinternet layerのヘッダーを読み取り、各パケットを転送します。受信側において、フレームはスタックを上に向かいます:各レイヤーは自身のヘッダーを取り除き、作用します。transport layerはシーケンス番号順にパケットを組み立てて欠落したものを要求し、application layerはメッセージを表示します。両端の各レイヤーで同じプロトコルを使用することが、やり取りを可能にしています。

Application layer

Application layer はユーザープログラムにサービスを提供し、そのプロトコルを定義します(WebにはHTTP、メールにはSMTPなど)。ここがプログラマが最も多くの作業を行う場所です。

Transport layer

Transport layer はポート番号によって識別されるプロセス間でデータをエンドツーエンドに配送します。2つのプロトコル:

TCPは接続を設定し、すべてのデータを順序通りに配送;UDPは送信して忘れる
TCPは接続して順序通りに配送;UDPは送信して忘れる
  • TCP — 接続指向型:接続を設定し、すべてのデータが順序通り届くことを保証し、失われたパケットを再送信し、フローを制御します。信頼性が高いが、オーバーヘッドがあります。HTTP, HTTPS, SMTP, FTPで使用されます。
  • UDP — 接続非指向型:送信して忘れる、応答や順序付けはありません。オーバーヘッドが低く、保証はありません。ストリーミング、DNS、ゲームで使用され、信頼性よりも速度が優先されます。

Internet layer

インターネット層は、IPを使ってホスト間でパケットを転送します。各パケットには送信元と受信先のIPアドレスが含まれ、ルーターがそれを次のステップへ転送します。 deliveryの保証は行わず、それはTCPの役割です。

家庭用ルーターはこの作業をあなたの家で行います:各パケットの宛先アドレスを読み取り、インターネットへ向けて、そして正しいデバイスへ戻すために転送します。

4本の直立アンテナと前面に並ぶ一列のステータスライトを持つ黒い家庭用Wi-Fiルーター
家庭用Wi-Fiルーター:デバイスとインターネットの間でパケットを転送します

ルーターがより広いインターネットに到達する前に、モデムがプロバイダーのケーブルや電話回線を通じて家庭をインターネットプロバイダーに接続します。そのライトはリンクが確立されておりオンラインであることを示しています。

シンプルな背景に直立している高い黒いケーブルモデム、前面に縦に並んだステータスライトの一列
ケーブルモデムは家庭用ネットワークをインターネットプロバイダーに接続します

リンク層

リンク層は、一つの物理リンク(イーサネット、Wi-Fi)上でビットを送信します。MACアドレスを含むフレームヘッダーを追加し、メディアアクセス制御を行います(例:イーサネットでのCSMA/CD)。

プレアamble、フレーム開始部、イーサネットデータ、インターパケットギャップに分かれたイーサネットフレーム、データ部分は拡張され、送信元・宛先MACアドレス、タイプ/長さ、ペイロードメッセージ、フレームチェックシーケンスとなり、それぞれにバイト単位のサイズが記載されています
一般的なイーサネットフレームの構成要素

有線ローカルネットワークでは、スイッチが多くのデバイスを接続します。各デバイスはイーサネットケーブル(RJ45プラグ)によってポートに接続され、スイッチは各フレームに含まれるMACアドレスを使用して、それを正しいポートのみへ送信します。

シンプルな背景にある小さな黒い8ポートギガビットイーサネットスイッチ、前面に一列に並んだ番号付きRJ45ポート、各ポートにはステータスライトがあります
ネットワークスイッチは、ローカルネットワーク上の多くの有線デバイスを接続します

物理リンクは銅線、無線信号(Wi-Fi)、または光ファイバーケーブルであることがあります。光ファイバーケーブルでは、ビットは非常に細いガラス繊維内を光の閃光として移動するため、高速で長距離のデータ伝送が可能です。

暗い背景に対して広がる光ファイバー束、各細いガラス繊維の先端に青白い光の点が輝いています
光ファイバーケーブル:データは細いガラス繊維を光として移動します

無線リンクは遥かに遠くまで届くことができます。衛星アンテナは衛星との間で無線信号を送信・受信し、有線リンクでは容易に到達できない場所へデータを運びます。

窓の横の家屋の壁に取り付けられた丸い灰色の家庭用衛星アンテナ、前面へ伸びるフィードアーム
衛星アンテナは長距離にわたって無線によるデータ送信・受信を行います
Explore · ⁨探索⁩

Tap the four layers of the TCP/IP model · ⁨TCP/IPモデルの4つのレイヤーをタップしてください⁩

Explore each layer. Data travels DOWN the stack as it's sent (each layer adds its header) and back UP as it's received — and any layer can be swapped without touching the others. · ⁨各レイヤーを探検してください。データは送信時にスタックを下へ移動し(各レイヤーがヘッダーを追加)、受信時には上へ戻ります。どのレイヤーも他のレイヤーに触れずに交換可能です。⁩

Vocabulary · ⁨語彙⁩ Train · ⁨練習する⁩
English 日本語
layers/ˈleɪəz/ レイヤー
modularity/ˌmɒdjʊˈlærɪti/ モジュラリティ
abstraction/əbˈstrækʃn/ 抽象化
protocol suite/ˈprəʊtəkɒl swiːt/ プロトコルスイート
application layer/ˌæplɪˈkeɪʃn ˈleɪə/ アプリケーション層
transport layer/ˈtrænspɔːt ˈleɪə/ トランスポート層
port numbers/pɔːt ˈnʌmbəz/ ポート番号
UDP/ˌjuː diː ˈpiː/ UDP
connectionless/kəˈnekʃənləs/ 接続非指向型
internet layer/ˈɪntənet ˈleɪə/ インターネット層
routers/ˈruːtəz/ ルーター
modem/ˈməʊdem/ モデム
link layer/lɪŋk ˈleɪə/ リンク層
CSMA/CD/ˌsiː es em ˈeɪ ˌsiː ˈdiː/ CSMA/CD
switch/swɪtʃ/ スイッチ
fibre-optic cable/ˈfaɪbə ˈɒptɪk ˈkeɪbl/ 光ファイバーケーブル
satellite dish/ˈsætəlaɪt dɪʃ/ 衛星アンテナ
HTTP/ˌeɪtʃ tiː tiː ˈpiː/ HTTP
FTP/ˌef tiː ˈpiː/ FTP
SMTP/ˌes em tiː ˈpiː/ SMTP
peer-to-peer/pɪə tə pɪə/ ピア・トゥ・ピア
tracker/ˈtrækə/ トラッカー
14.1

Common application-layer protocols · ⁨一般的なアプリケーション層プロトコル⁩

English
  • HTTP 超文本传输协议 — browsers fetch web pages from servers (over TCP, port 80). HTTPS is HTTP over TLS — encrypted, port 443.
  • FTP 文件传输协议 — transfer files between client and server.
  • SMTP 简单邮件传输协议 — send email between client and server, and between servers. Receiving uses POP3 or IMAP.
  • POP3 — downloads email and usually deletes it from the server. IMAP — leaves email on the server and syncs across devices, so the same inbox appears everywhere.
  • BitTorrent — a peer-to-peer 对等网络 protocol; a file is split into pieces downloaded from many peers in parallel, so no single server carries all the load.

The purpose of each protocol, in the words that score.

Protocol Purpose (state this)
HTTP transfers web pages (hypertext) between a web server and a browser; HTTPS is the encrypted version
FTP transfers files between a client and a server (uploading to and downloading from a file server)
SMTP sends email from a client to a mail server, and between mail servers (a "push" protocol)
POP3 downloads email from the server to the client, usually deleting it from the server, so it is read on one device
IMAP lets the client read and manage email that stays on the server, so the same mailbox is seen on every device
BitTorrent shares files peer-to-peer: pieces of a file are downloaded from, and uploaded to, many other users at once

Asked for the two email protocols, give SMTP for sending and POP3 or IMAP for receiving; asked to describe IMAP, say that the messages remain on the server and are synchronised across devices, which is the difference from POP3.

"Describe how files are shared using the BitTorrent protocol" (four marks). (1) The file is split into pieces (typically 256 KB each), and a small torrent file describes them (their hashes) and names a tracker 追踪器. (2) A peer wanting the file contacts the tracker, which keeps a list of the peers in the swarm 群 currently sharing that file. (3) The peer downloads different pieces from many peers at the same time, and as soon as it holds a piece it uploads it to others; a peer with the whole file is a seed 种子, one still downloading a leech. (4) When all pieces are in, they are reassembled and checked against the hashes. "Explain what peer-to-peer file sharing means": there is no central server holding the file; every computer is both a client and a server, downloading from and uploading to the others, so the load and the bandwidth are spread across the swarm and the more peers there are, the faster it gets.

日本語
  • HTTP — ブラウザがサーバーからWebページを取得します(TCP上、ポート80)。HTTPSはTLS上のHTTPであり、暗号化されており、ポート443を使用します。
  • FTP — クライアントとサーバー間でファイルを転送します。
  • SMTP — クライアントとサーバー間、およびサーバー間でメールを送信します。受信にはPOP3またはIMAPを使用します。
  • POP3 — メールをダウンロードし、通常はサーバーから削除します。IMAP — メールをサーバーに残したまま、デバイス間で同期するため、どこでも同じ Inboxが表示されます。
  • BitTorrent — ピア・トゥ・ピーアプロトコルです。ファイルは複数のピースに分割され、多くのピアから同時に平行してダウンロードされるため、単一のサーバーがすべての負荷を負うことはありません。
中央にトラッカーがあり、周囲にシード、リーチ、新しいピアが配置され、キーを伴ってファイルピースを交換している様子
BitTorrent: トラッカーがピア同士を見つけ助け、その後ファイルピースを直接共有します

各プロトコルの目的(採点基準となる表現)

プロトコル 目的(これを述べる)
HTTP Webサーバーとブラウザの間でWebページ(ハイパーテキスト)を転送;HTTPSは暗号化されたバージョン
FTP クライアントとサーバー間でファイルを転送(ファイルサーバーへのアップロードおよびダウンロード)
SMTP クライアントからメールサーバーへ、およびメールサーバー間でメールを送信("プッシュ"プロトコル)
POP3 サーバーからクライアントへメールをダウンロードし、通常はサーバーから削除するため、1台のデバイスで読み取られる
IMAP サーバーに残っているメールをクライアントが読み取り・管理でき、どのデバイスでも同じメイルボックスが見える
BitTorrent ピア・トゥ・ピーアでファイルを共有:ファイルのピースは他の多くのユーザーから同時にダウンロードされ、アップロードされる

2つのメールプロトコルを問われた場合、送信にはSMTP、受信にはPOP3またはIMAPを答えます。IMAPを説明する場合は、メッセージがサーバーに残ることと、デバイス間で同期されることを述べ、これがPOP3との違いであると答えます。

「BitTorrentプロトコルを用いてファイルがどのように共有されるかを記述せよ」(4点) (1) ファイルはピース(一般的に256 KB単位)に分割され、小さなtorrentファイルがそれらを記述(ハッシュ値など)し、トラッカーの名前を指定します。(2) ファイルを必要とするピアがトラッカーに連絡し、トラッカーは現在そのファイルを共有しているピアのリストであるswarmを保持しています。(3) ピアは異なる多数のピアから同時にピースをダウンロードし、ピースを所持した瞬間にアップロードします。ファイル全体を持つピアはseed、まだダウンロード中のピアはleechと呼ばれます。(4) すべてのピースが揃えば、ハッシュ値と比較しながら再構成・検証されます。「ピア・トゥ・ピーアのファイル共有が何を意味するかを説明せよ」:ファイルを保持する中央サーバーはない;すべてのコンピュータはクライアントかつサーバーであり、他からダウンロードし、他へアップロードするため、負荷と帯域幅はswarm全体に分散され、ピアが増えるほど速くなります。

Explore · ⁨探索⁩

Network route lab · ⁨ネットワークルート実験⁩

Follow data from a device through network hardware and protocols. · ⁨デバイスからネットワークハードウェアおよびプロトコルを経てデータを追跡せよ。⁩

Vocabulary · ⁨語彙⁩ Train · ⁨練習する⁩
English 日本語
TCP/ˌtiː siː ˈpiː/ TCP
connection-oriented/kəˈnekʃn ˈɔːrɪəntɪd/ 接続指向型
packets/ˈpækɪts/ パケット
swarm/swɔːm/ スワーム
seed/siːd/ seed
14.2

Circuit switching vs packet switching · ⁨回路交換対パケット交換⁩

Syllabus · ⁨シラバス⁩
English
Candidates should be able to: Notes and guidance
Show understanding of circuit switching Benefits, drawbacks and where it is applicable
Show understanding of packet switching Benefits, drawbacks and where it is applicable Show understanding of the function of a router in packet switching Explain how packet switching is used to pass messages across a network, including the internet
日本語
受験者は以下的能力を備えているべきである: メモおよびガイドライン
サイクルスイッチングの理解 利点、欠点、および適用場所
パケットスイッチングの理解 利点、欠点、および適用場所 パケットスイッチングにおける路由器の機能の理解 パケットスイッチングがネットワーク、インターネットを含む、メッセージを伝送するためにどのように使用されるかの説明

Source: Cambridge International syllabus · ⁨出典: Cambridge International シラバス⁩

English

Circuit switching

A dedicated path is set up between the two ends before any data is sent (circuit switching 电路交换), reserved for the whole conversation, then released. It gives reserved bandwidth 带宽 and in-order delivery, but is inefficient during silences and slow to set up. Classic example: the traditional telephone network.

"Describe circuit switching as a method of data transmission" (three marks). (1) A dedicated path (circuit) is set up between the sender and the receiver before any data is sent; (2) the whole message is sent along that path, in order, as one continuous stream; (3) the circuit is reserved for the duration of the communication and released afterwards.

Benefits and drawbacks. Benefits: the full bandwidth of the circuit is available and guaranteed; data arrives in order with no reassembly and no delay once the circuit is up; the route does not change, so timing is predictable (good for real-time voice and video). Drawbacks: time is spent setting up the circuit before anything is sent; the circuit is reserved even while no data is flowing, so bandwidth is wasted and other users cannot share it; both ends must be free at the same time; a failure anywhere on the path breaks the whole call, and there is no automatic alternative route. Where it is appropriate: a telephone call or a live video link, where a steady, uninterrupted stream matters more than efficiency.

Packet switching

The data is split into packets, each sent independently (packet switching 分组交换). Each packet carries the destination address; routers make per-packet decisions, so packets may take different routes and arrive out of order, and the destination reassembles them. It is efficient (one link is multiplexed 多路复用 across many conversations), robust (reroute around a failure), but has variable latency 延迟 and possible loss (TCP handles reliability). Used by the internet.

"Describe how packet switching is used to pass messages across a network" (four marks). (1) The message is split into packets of a fixed maximum size; (2) each packet is given a header containing the source and destination addresses, a sequence number 序号 and an error check; (3) each packet is sent independently and may take a different route, chosen by the routers it meets; (4) at the destination the packets are reassembled in order using the sequence numbers, and any missing packet is requested again. If the question excludes checking and resending, leave out the last clause.

"Describe the function of a router in packet switching" (three marks). A router receives a packet, reads the destination IP address in its header, and consults its routing table 路由表 to decide the best next hop towards that destination, taking account of the traffic (congestion) and failed links; it then forwards the packet onto that link. Packets of the same message may leave by different routes; the router holds packets in a queue when a link is busy.

"Describe two ways packet switching ensures the complete message is received." (1) Each packet carries a sequence number, so the receiver can put the packets in order and can tell that one is missing, and (2) the receiver sends an acknowledgement 确认 for packets that arrive; a packet not acknowledged within a time limit is retransmitted by the sender. A checksum 校验和 in each packet lets the receiver detect a corrupted packet and discard it, which then triggers the resend.

Benefits and drawbacks. Benefits: no circuit to set up; the network's links are shared by many messages, so bandwidth is used efficiently; packets can be rerouted around a failed or congested link, so transmission is robust; a lost or damaged packet means resending only that packet, not the whole message. Drawbacks: packets may arrive out of order and must be reassembled, and some may be lost or delayed; the headers add overhead; the variable delay makes it less suitable for real-time voice and video without extra measures; a heavily loaded network drops packets. Where it is appropriate: email, web pages, file downloads and any "bursty" traffic, and the internet in general.

Aspect Circuit switching Packet switching
Path dedicated, reserved shared, per-packet
Setup time slow none
Bandwidth use inefficient efficient
Order in order may be out of order
Robustness one failure cuts the circuit reroute around failures
Suits constant-rate flows (voice) bursty flows (web, email)

Modern networks use packet switching for its efficiency and resilience.

Four differences, stated as pairs. (1) Circuit switching sets up a dedicated path before sending; packet switching sends without setting up a path. (2) In circuit switching the whole message follows one route; in packet switching the packets may take different routes. (3) Circuit switching delivers the data in order without reassembly; packet switching needs sequence numbers to reassemble it. (4) Circuit switching reserves bandwidth for one conversation even when idle; packet switching shares the links between many messages. (Also acceptable: a failed link breaks a circuit but packets are rerouted; circuit switching suits real-time streams, packet switching suits bursty data.) Write each difference as both halves; one side alone earns nothing.

Describing packet switching in a few sentences

A good exam answer: "The message is broken into small packets. Each packet carries the destination and source addresses and a sequence number. Each packet travels through the network independently, with routers choosing the next hop per packet. Packets may take different paths and arrive out of order. The destination uses the sequence numbers to reassemble the message, and missing packets can be requested again."

Worked example. A phone call and a large file download share a network. Which switching method suits each, and why? A phone call needs a steady stream with low delay, and it would suffer badly if pieces arrived late or out of order - so circuit switching suits it: a dedicated path is set up for the whole call and its capacity is reserved for the duration. A file download does not care about timing or arrival order, because the receiver reassembles it, and it benefits from using whatever capacity happens to be spare - so packet switching suits it: the file is split into packets that travel independently, each carrying source and destination addresses and a sequence number, with routers choosing a next hop per packet. Name the property of the traffic that decides it: reserved capacity and low delay for the call, efficiency and resilience for the download.

日本語

回路交換

データ送信前に両端の間に専用パスが確立される(回路スイッチング)。このパスは通話全体のために予約され、終了後に解放されます。予約された帯域幅と順次配送を提供しますが、音声がない間は非効率で、確立に時間がかかります。代表的な例:従来の電話ネットワーク。

デバイスAとB間のルータのメッシュ、其中一個のパスがハイライトされ、通話全体のためにエンドツォエンドで予約されている
回路スイッチング: エンドツォエンドで専用パスが予約される

「データ伝送方法としての回路スイッチングを説明せよ」(3点) (1) データ送信前において、送信者と受信者の間に専用パス(回路)が確立される;(2) メッセージ全体がそのパス上を順次、連続したストリームとして送られる;(3) 通信の期間中回路は予約され、その後解放される。

メリットとデメリット。 メリット: 回路の全帯域幅が利用可能かつ保証されており、データは順次到着し、回路確立後は再構成や遅延なし;ルートは変更されないためタイミングが予測可能(リアルタイム音声・動画に適する)。デメリット: データ送信前に回路を確立するのに時間を要する;データ転送がない間も回路が予約されるため帯域幅が浪費され、他のユーザーとの共有ができない;両端が同時に空きである必要がある;パス上のいかなる箇所の故障でも通話全体が切断され、自動的な代替ルートがない。 適応場面: 安定して途切れないストリームが効率より重要な電話通話やライブ動画リンク。

パケットスイッチング

データはパケットに分割され、それぞれが独立して送られる(パケットスイッチング)。各パケットには宛先アドレスが含まれ、ルータはパケット単位で判断を行うため、異なるルートを通過して順序不同に到着することがあり、最終的に受信側で再構成される。効率的であり(リンクが多数の通話間で多重化される)、強靭性がある(故障時におけるリルート可能)が、遅延の変動があり、パケット損失の可能性もある(TCPが信頼性を管理)。インターネットで用いられている。

同じルータメッシュで、パケットが番号付き彩色四角形として示され、コンピュータAからBへ異なるルートを通り、Bで順次に再構成される様子
パケットスイッチング: パケットは独立して移動し、異なるルートを通ることがある
パケットの構成: ソースおよび宛先アドレス、シーケンス番号、パケット数、チェックサムを含むヘッダーに続き、そのパケット分のデータを担うペイロード
パケットが単独で移動できる理由: アドレスが場所を示し、シーケンス番号がメッセージのどの部分かを示し、チェックサムが破損なく到着したかを確認するため

「パケットスイッチングによってメッセージをネットワーク越しに渡す仕組みを説明せよ」(4点) (1) メッセージは固定の最大サイズを持つパケットに分割される;(2) 各パケットにはソースおよび宛先アドレス、シーケンス番号、エラーチェックを含むヘッダーが付与される;(3) 各パケットは独立して送られ、遭遇するルータによって選択された異なるルートを通る可能性があります;(4) 受信側ではシーケンス番号を用いてパケットが順次に再構成され、欠落しているパケットは再送信を要求される。質問がチェックと再送信を除外する場合、最後の節は省略する。

「パケットスイッチングにおけるルータの機能について説明せよ」(3点) ルータはパケットを受け取り、ヘッダー内の宛先IPアドレスを読み取り、ルーティングテーブルを参照して、交通量(混雑)や故障したリンクを考慮してその宛先への最適な次のホップを決定し、パケットをそのリンクに転送する。同じメッセージのパケットは異なるルートで送出される場合があり、ルータはリンクが混雑している間パケットをキューに保持する。

「パケットスイッチングがメッセージ完全着信を保証する2つの方法を説明せよ。」 (1) 各パケットにはシーケンス番号が含まれるため、受信者はパケットを順に並べ替え、欠落していることを認識でき、(2) 正常に届いたパケットに対して確認応答を送信する;一定時間以内に確認応答がないパケットは再送信される。各パケットに含まれるチェックサムにより、破損したパケットを検出して破棄でき、これが再送信のトリガーとなる。

メリットとデメリット。 メリット: 回路確立不要;ネットワークのリンクが多数のメッセージで共有されるため帯域幅の効率が良く、パケットは故障や混雑したリンクを避けてリルート可能で、伝送が強靭;失われたパケットはそのパケットのみを再送信すればよく、メッセージ全体を再送する必要がない。デメリット: パケットは順序不同に到着して再構成が必要となり、一部が失われるか遅延する;ヘッダーによるオーバーヘッドがある;変動する遅延のため、追加の対策がない限りリアルタイム音声・動画には不向き;過負荷状態のネットワークではパケットが破棄される。 適応場面: メール、Webページ、ファイルダウンロードなどの「バースト性」のあるトラフィック、およびインターネット全般。

側面 回線交換 パケット交換
パス 専用、予約 共有、パケット単位
確立時間 遅い なし
帯域幅使用 非効率 効率が良い
順序 順次 順序不同の場合あり
強靭性 一处の故障で回路が切断 故障時のリルート
適応 定速フロー(音声) バースト性フロー(Web、メール)

現代のネットワークは、効率性と耐障害性のためにパケットスイッチングを採用している。

4つの違いをペアとして述べる。(1)回路スイッチングは送信前に専用パスを設定しますが、パケットスイッチングはパスを設定せずに送信します。(2)回路スイッチングではメッセージ全体が一つの経路を通りますが、パケットスイッチングではパケットが異なる経路を取ることがあります。(3)回路スイッチングは再構成なしでデータを送信順序に delivery しますが、パケットスイッチングには再構成のためのシーケンス番号が必要です。(4)回路スイッチングはアイドル時でも1通の会話のために帯域幅を予約しますが、パケットスイッチングは多くのメッセージ間でリンクを共有します。(他の許容回答:故障したリンクは回路を切断しますが、パケットはリルートされます;回路スイッチングはリアルタイムストリームに適し、パケットスイッチングはバースト性のあるデータに適しています。)各違いについて両方の半分を書きます。片方だけでは得点されません。

数文でパケットスイッチングを説明する

良い受験答案例:「メッセージは小さなパケットに分割されます。各パケットには宛先と発信元のアドレス、およびシーケンス番号が含まれます。各パケットはネットワーク内を独立して移動し、ルーターはパケットごとに次のホップを選択します。パケットは異なる経路をたどり、順序不同着になることがあります。受信側はシーケンス番号を使ってメッセージを再構成し、欠落したパケットは再送信を要求できます。」

** worked example(解説例)。電話通話と大規模ファイルダウンロードが同一のネットワークを共有しています。それぞれに適したスイッチング方式は何か、またその理由を答えよ。電話通話は低遅延の安定したストリームが必要であり、パケットが到着が遅れたり順序不同着になったりすると深刻な障害を受けるため、回路スイッチングが適しています:通話全体に対して専用パスが設定され、その期間中、容量が予約されるからです。ファイルダウンロードはタイミングや到着順序に関係なく、受信側が再構成するため、利用可能な余剰容量をすべて使用できる benefit を受けることができます:したがってパケットスイッチングが適しています:ファイルはパケットに分割され、独立して移動し、各パケットにはソースと宛先のアドレス、およびシーケンス番号が含まれ、ルーターがパケットごとに次のホップを選択します。これを決定するトラフィックの性質**を名詞で答えること:通話への予約された容量と低遅延、ダウンロードへの効率性と耐性です。

Explore · ⁨探索⁩

A packet's journey across the internet · ⁨インターネット上でのパケットの旅⁩

Step through packet switching. The message is split up, each packet finds its own way, and the destination puts them back together — which is why the internet is so efficient and hard to break. · ⁨パケット交換の仕組みを順に確認しましょう。メッセージが分割され、各パケットは独自の経路をたどり、最終地点で再統合されます。これが、インターネットが非常に効率的であり、かつ破壊しにくい理由です。⁩

Vocabulary · ⁨語彙⁩ Train · ⁨練習する⁩
English 日本語
circuit switching/ˈsɜːkɪt ˈswɪtʃɪŋ/ 回線交換
reserved bandwidth/rɪˈzɜːvd ˈbændwɪdθ/ 予約帯域幅
packet switching/ˈpækɪt ˈswɪtʃɪŋ/ パケット交換
multiplexed/ˌmʌltɪˈplekst/ 多重化
variable latency/ˈveərɪəbl ˈleɪtənsi/ 可変レイテンシ
sequence number/ˈsiːkwəns ˈnʌmbə/ シーケンス番号
routing table/ˈraʊtɪŋ ˈteɪbl/ ルーティングテーブル
14.2

Definitions the examiner accepts · ⁨出題者が認める定義⁩

English

A definition question is marked against fixed wording. Learn these exactly, and give one answer only.

Term Definition
protocol a set of rules governing how data is transmitted, agreed by sender and receiver so that both interpret it the same way
protocol stack the layers of protocols, each with its own function, that together carry out communication; each layer communicates only with the layers above and below
application layer provides the protocols used by applications to exchange data (HTTP, SMTP, FTP, IMAP, POP3)
transport layer establishes end-to-end communication, splits data into packets with port and sequence numbers, reassembles them and requests missing ones (TCP), or sends without guarantees (UDP)
internet layer adds IP addresses to form packets and routes them between networks via routers
link layer adds MAC addresses to form frames and transmits the bits over the physical local network
router a device that reads a packet's destination address and forwards it along the best available route towards that destination
circuit switching a dedicated communication path is established between the two ends before data is sent and held for the whole transmission
packet switching the message is split into packets, each with a header, sent independently over possibly different routes and reassembled at the destination
packet a unit of data carrying a header (addresses, sequence number, error check) and a payload
peer-to-peer file sharing without a central server, each computer acting as both client and server
日本語

定義問題は固定された用語に基づいて採点されます。これらを正確に暗記し、一つの答えのみを答えてください。

用語 定義
プロトコル データの送受信を支配する一連のルールであり、送信側と受信側が合意しており、双方が同じ解釈を行うようにする
プロトコルスタック 通信を実行するために一体となって機能するプロトコルの層であり、各層は独自の機能を持ちます;各層は上下の隣接層とのみ通信します
アプリケーション層 アプリケーションがデータ交換に使用するプロトコルを提供します(HTTP, SMTP, FTP, IMAP, POP3)
トランスポート層 エンドツーエンドの通信を確立し、ポート番号とシーケンス番号付きのパケットにデータを分割、再構成し、欠落パケットを要求します(TCP)、または保証なしで送信します(UDP)
インターネット層 IPアドレスを追加してパケットを形成し、ルーターを介してネットワーク間でルーティングします
リンク層 MACアドレスを追加してフレームを形成し、物理的なローカルネットワーク上へビットを送信します
ルーター パケットの宛先アドレスを読み取り、その宛先に向かう最も適切な経路に従って転送するデバイス
回路スイッチング データ送信前に両端の間に専用通信パスが確立され、全送信期間中保持される
パケットスイッチング メッセージがパケットに分割され、各パケットにはヘッダーが付与され、可能であれば異なる経路を通じて独立して送信され、宛先で再構成される
パケット ヘッダー(アドレス、シーケンス番号、エラーチェック)とペイロードを含むデータの単位
ピア・トゥ・ピア 中央サーバーのないファイル共有、各コンピューターがクライアントかつサーバーとして動作する
14.2

Exam tips · ⁨試験対策⁩

English
  • Why protocols: shared rules, same interpretation, any make of computer. Why layers: each layer has one job and can be changed independently.
  • The four layers in order, top to bottom: Application, Transport, Internet, Link. Give each layer's job in one sentence, and the "message from host to host" answer as a walk down the stack and back up.
  • Protocol purposes are one-liners: HTTP web pages, FTP files, SMTP sending mail, POP3 downloading mail, IMAP mail kept on the server, BitTorrent peer-to-peer pieces from a swarm.
  • Circuit switching: dedicated path first, whole message, held for the duration. Packet switching: split, header with addresses and sequence number, independent routes, reassemble. Benefits and drawbacks come in pairs of opposites.
  • A router reads the destination address, consults its routing table, forwards along the best route; it is the packet-switching question the exam asks most.
  • "Where appropriate": circuit switching for a phone or live video call; packet switching for email, the web and downloads.

Common mistakes

  • Defining a protocol as "a language" or "software"; it is a set of rules.
  • Putting the layers in the wrong order, or giving the OSI seven layers instead of the four of TCP/IP.
  • Describing the transport layer as "routing" or the internet layer as "splitting into packets"; ports and splitting are transport, IP addresses and routing are internet.
  • Confusing POP3 with IMAP, or saying SMTP receives email.
  • Describing packet switching without the header (addresses and sequence number) or without reassembly.
  • Saying a router "sends the packet everywhere"; it chooses one next hop from its routing table.
  • Giving a benefit of packet switching as a drawback of circuit switching without stating the circuit-switching side; each difference needs both halves.
  • Claiming packet switching guarantees delivery by itself; the transport layer's sequence numbers and acknowledgements do that.
日本語
  • プロトコルの目的:共通ルールによる同じ解釈、どのメーカーのコンピューターでも互換性があること。レイヤーの目的:各レイヤーは単一のタスクを持ち、独立して変更可能であること。
  • 上から下への4つのレイヤー:アプリケーション、トランスポート、インターネット、リンク。各レイヤーの役割を1文で答え、「ホストからホストへのメッセージ」についてはスタックを下って戻ってくる流れとして説明すること。
  • プロトコルの用途は一言で:HTTPはWebページ、FTPはファイル、SMTPはメール送信、POP3はメールダウンロード、IMAPはサーバー上のメール保持、BitTorrentはピアー・トゥ・ピアによる swarm からのピース取得。
  • 回路スイッチング:まず専用パス、メッセージ全体、期間中保持。パケットスイッチング:分割、アドレスとシーケンス番号付きヘッダー、独立した経路、再構成。利点と欠点は対照的なペアで述べること。
  • ルーターは宛先アドレスを読み取り、ルーティングテーブルを参照し、最適な経路に従って転送します。これが試験で最も頻出するパケットスイッチングに関する問題です。
  • 「適切に応じて」:電話やライブ動画通話には回路スイッチング、メール、Web、ダウンロードにはパケットスイッチング。

一般的なミス

  • プロトコルを「言語」や「ソフトウェア」と定義することは誤りです。それは一連のルールです。
  • レイヤーの順序を間違えたり、TCP/IPの4レイヤーではなくOSIの7レイヤーを記述したりすること。
  • トランスポート層を「ルーティング」、インターネット層を「パケット分割」と記述することは誤りです。ポート番号と分割はトランスポート層、IPアドレスとルーティングはインターネット層です。
  • POP3とIMAPを混同したり、SMTPがメールを受信すると主張したりすること。
  • ヘッダー(アドレスとシーケンス番号)なし、あるいは再構成なしでパケットスイッチングを記述すること。
  • ルーターが「パケットをどこかに送信する」と言うことは誤りです。ルーティングテーブルから1つの次のホップを選択します。
  • パケットスイッチングの利点を回路スイッチングの欠点として述べる際、回路スイッチング側の記述を欠くこと。各違いには両方の半分が必要です。
  • パケットスイッチング自体が配送を保証すると主張することは誤りです。これはトランスポート層のシーケンス番号と_acknowledgements_が行うことです。
Vocabulary · ⁨語彙⁩ Train · ⁨練習する⁩
English 日本語
acknowledgement/əkˈnɒlɪdʒmənt/ 承認
checksum/ˈtʃeksəm/ チェックサム
IP address/ˌaɪ ˈpiː əˈdres/ IPアドレス
MAC addresses/mæk əˈdresɪz/ MACアドレス
bandwidth/ˈbændwɪdθ/ 帯域幅
latency/ˈleɪtənsi/ レイテンシ
header/ˈhedə/ ヘッダー

Interactive lessons on this topic · ⁨このトピックのインタラクティブ授業⁩

Work through it step by step, with instant-check exercises. · ⁨一歩ずつ進め、即時チェック付きの問題で学習します。⁩

Past Papers · ⁨過去問⁩

More topics in A-Level Computer Science · ⁨A-Level コンピューター科学⁩ · ⁨A-Level Computer Science · ⁨A-Level コンピューター科学⁩ の他のトピック⁩

Log in or create account · ⁨ログインまたはアカウント作成⁩

IGCSE, A-Level & AP