TCP/IP illustated: 第二章 Link Layer

Link Layer

Introduction


link layer 是 Internet protocol suite 中的 lowest layer.
从上图可以得知,link layer 主要有三种任务,这三种任务分别是: 

  1. 接受或者发送 IP datagrams 
  2. 接送或者发送 ARP requests
  3. 接受或者发送 RARP requests

同时, 不同种类的 networking hardware 可以产生不同类型的 link layer,例如:

  • Ethernet
  • token ring
  • FDDI
  • serial lines

在这一章节主要介绍了 

  1. Ethernet link layer
  2. serial interface link layer(SLIP & PPP)
  3. loopback driver

这三种类型的 link layer;此外,介绍了 link layer 的特性——MTU(Maximum Transmission Unit).

Ethernet link layer

定义: Ethernet 是由 Intel 和 Xerox 创建的 TCP/IP 中 LAN(local area network) 的 predominant form, 这是一个工业标准.

特性:

  1. 都含有 destination & source address
  2. 都含有 CRC(cyclic redundancy check)
  3. 都有 minium 机制,因此会出现 PAD 来补长.

SLIP(Serial Line IP) & CSLIP(compressed SLIP)

定义: 用于 IP datagram 的 encapsulation 的一种简单的形式.

特性:

  1. No method for one end to inform the other's IP address
  2. No type field
  3. No checksum added by SLUP

CSLIP
如果内容太少,而 header 字节太多,就会造成不必要的浪费. CSLIP 能够将普遍的字节变成几个很短的字节.

PPP:Point-to-Point Protocol

定义: 另外一种 Serial line 上的传输方式

特性: it corrects all the deficiencies in SLIP, 并且有如下优点:

  1. support multiple protocols for a single line
  2. CRC on every frame
  3. dynamic negotiation of the IP address for each end
  4. TCP/IP header compression like CLISP
  5. a link-control protocol for negotiating many data-link options

Loopback interface

定义: 当 client 和 server 在同一台机器上的时候,就会使用 loopback interface, 系统默认使用 127.0.0.1 和 localhost 分别作为 IP address 和 name.

MTU

定义: 在 encapsulation 中的 IP datagram 的最大字节数目. 当字节数超过 MTU 的时候, 这个 IP datagram 将会分成 smaller pieces, so that each fragment is smaller than MTU.

path MTU

定义:当两台主通过 multiple networks 进行对话的时候,可能会有不同的 MTU, 这时 smallest MTU 是两台主机之间的交流方式, 这个 MTU 称为 path MTU

特性:
在两台主机之间的 MTU 并不是 constant, 可随时间变化





posted @ 2019-06-10 10:42  FBshark  阅读(227)  评论(0编辑  收藏  举报