> For the complete documentation index, see [llms.txt](https://kunishi.gitbook.io/web-application-textbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kunishi.gitbook.io/web-application-textbook/intnettotcpip.md).

# 補遺: インターネット、TCP/IP

* TCP/IP（またはUDP/IP）を標準プロトコルとする世界的規模のネットワーク
  * TCP: Transmission Control Protocol
  * UDP: User Datagram Protocol
  * IP: Internet Protocol

## 歴史

* 1962年、米・国防総省でインターネットの原型となる分散ネットワークの研究が開始される
* 1969年、インターネットの原型が誕生(ARPANET)
* 1970年代半ば、TCP/IPが開発される→UNIXに実装
* 1983年、軍事部門と研究ネットワークが分離される
* 1984年、日本でTCP\\/IPベースのネットワークが誕生（JUNET）

## インターネットの通信プロトコル

以下の4層構造である。DARPAモデルと呼ばれ、[RFC1122](http://tools.ietf.org/html/rfc1122)で規定されている。

* アプリケーション層：具体的なインターネットアプリケーションの通信を実現する層（HTTP, SMTP, DNSなど）
* トランスポート層：データ転送（TCP, UDPなど）
* インターネット層：パケット配送、ルーティング（IP）
* リンク層：物理的なケーブルやネットワークアダプタ（イーサネット、WiFiなど）

[![IP stack connections.svg](https://upload.wikimedia.org/wikipedia/commons/thumb/c/c4/IP_stack_connections.svg/1200px-IP_stack_connections.svg.png)](https://commons.wikimedia.org/wiki/File:IP_stack_connections.svg#/media/File:IP_stack_connections.svg)\
By [en:User:Kbrose](https://en.wikipedia.org/wiki/User:Kbrose) - Prior Wikipedia artwork by en:User:Cburnett, [CC 表示-継承 3.0](http://creativecommons.org/licenses/by-sa/3.0/), <https://commons.wikimedia.org/w/index.php?curid=1831900>

(<http://ja.wikipedia.org/wiki/%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB:IP_stack_connections.svg>)

## IPアドレス

IP上で、ネットワーク上の機器を識別するために使用する番号。下記は、現在広く用いられているIPv4のアドレス構成である。

[![Ipv4 address ja.svg](https://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Ipv4_address_ja.svg/1200px-Ipv4_address_ja.svg.png)](https://commons.wikimedia.org/wiki/File:Ipv4_address_ja.svg#/media/File:Ipv4_address_ja.svg)\
By Original: [en:User:Indeterminate](https://en.wikipedia.org/wiki/User:Indeterminate) Japanese translation: [User:Lusheeta](https://github.com/kunishi/web-application-textbook/tree/6bca0f5de988a7ae94ae48ceddd76b29711eeca9/commons.wikimedia.org/w/index.php?title=User:Lusheeta\&action=edit\&redlink=1) - [File:Ipv4\_address.svg](https://github.com/kunishi/web-application-textbook/tree/6bca0f5de988a7ae94ae48ceddd76b29711eeca9/commons.wikimedia.org/wiki/File:Ipv4_address.svg), パブリック・ドメイン, <https://commons.wikimedia.org/w/index.php?curid=7688865>

(<http://ja.wikipedia.org/wiki/%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB:Ipv4_address_ja.svg>)

## FQDNとDNS

TCP/IP上の通信では、すべてIPアドレスを用いて通信相手を指定する。しかし一方で、IPアドレスは単なる数字の羅列であり、人間には極めて覚えにくい。そのため、人間に覚えやすい形式でインターネット上のホスト名を指定する方法として、FQDN（Fully Qualified Domain Name）が使われている。`google.com`, `ja.wikipedia.org`, `www.example.jp`などはFQDNの例である。

FQDNとIPアドレスの対応づけを管理するインターネットサービスがDNS（Domain Name Service）である。DNSサービスを提供するコンピュータ（DNSサーバ）に対して

* FQDNを検索すると、対応するIPアドレスを
* IPアドレスを検索すると、対応するFQDNを（もしあれば）

それぞれ返してくれる。ブラウザなどで `http://www.example.jp/` のようにFQDNを用いたURIを指定することができるのは、ソフトウェアの内部でDNSサービスを利用してIPアドレスを取得しているためである。DNSサービスの仕組みは、本講義の範疇を越えるので省略する。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kunishi.gitbook.io/web-application-textbook/intnettotcpip.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
