计算机网络Chapter 1读书笔记

Chapter 1了解一些基本概念即可。

Internet

network由若干node和link组成,而所谓互联网(internet)就是“网络的网络”(network of networks),也就是把网络之间通过router连接起来。
Internet是世界上最大的internet,它采用TCP/IP协议(protocol)族作为通信的规则。

network structure

network edge

network edge由所有连接在因特网上的host组成,由用户直接使用。
host也有两种通信方式:

client-server method(C/S)

客户(client)是服务请求方,服务器(server)是服务提供方。

peer to peer method(P2P)

对等连接(P2P)是指两个host在通信时并不区分哪一个是服务请求方还是服务提供方,只要两个主机都运行了对等连接软件(P2P软件),它们就可以进行平等的、对等连接通信。

network core

由大量网络和连接这些网络的路由器组成,这部分为network edge提供服务(提供连通性和交换)。

circuit switching

电路交换(circuit switching)就是在主叫端(呼叫端)和被叫端建议一条专用的物理通路。在通话的全部时间内,通话的两个用户始终占用端到端的通信资源。

FDMTDM:FDM用frequency划分通道(即为每个用户分配不同的频率段),而TDM用time划分通道(即为每个用户分配不同的时间段)。
缺点:线路传输效率往往很低,通信线路资源在大部分时间里都是空闲的。

packet switching

在每一个数据段前面加上一些由必要的控制信息组成的header后,就构成了一个packet,以packet为单位进行分组转发,每次转发一个packet。
packet switching的优点:

  1. 高效。在分组传输的过程中动态分配传输带宽,对通信链路是逐段占用。
  2. 灵活。为每一个分组独立的选择转发路由。
  3. 迅速。以分组作为传送单位,可以不先建立连接就能向其他主机发送分组。
  4. 可靠。保证可靠性的网络协议;分布式多路由的分组交换网,使网络有很好的生存性。

缺点: 由于packet switching不像circuit switching那样通过建立连接来保证通信时所需的各种资源,因而无法保证通信时端到端所需的带宽。并且有时还会出现queue的现象造成packet loss and delay。

How do loss and delay occur?
packets queue in router buffers

  1. packet arrival rate to link (temporarily) exceeds output link capacity
  2. packets queue, wait for turn 0

delay

网络中的时延(delay)由四个部分组成。

transmission delay

发送时延(transmission delay)是由主机或路由器发送数据帧所需要的时间。发送时延=数据帧长度/发送速率。

propagation delay

传播时延(propagation delay)是电磁波在信道中传播一定的距离需要花费的时间。传播时延=信道长度/电磁波在信道上的传播速率。

processing delay

主机或路由器在收到分组时要花费一定的时间进行处理。 1.check bit errors 2.determine output link 3.typically < msec

queueing delay
  1. time waiting at output link for transmission
  2. depends on congestion level of router

packet在进入路由器后要先在输入队列中排队等待处理,在路由器确定了转发接口后,还要在输出队列中排队等待转发,这就产生了排队延迟。

delay= transmission delay+ propagation delay+ processing delay+ queueing delay。

host

所谓host就是主机的意思,也被叫做终端end system。

ISP

ISP全称是 Internet Service Provider,也就是因特网服务提供者。
ISP可以从因特网管理机构申请很多IP地址(IP地址通常不会单个发放),用户可以通过ISP获取IP地址的使用权并通过ISP接入到因特网。

主干ISP/地区ISP/本地ISP

根据提供服务的覆盖面积大小以及所拥有的IP地址数目的不同,ISP分为不同的层次:主干ISP/地区ISP/本地ISP。 IXP(Internet eXchange Point)可以让internet更快的完成转发分组任务,IXP的作用是:
允许两个网络直接相连并交换分组,而不需要再通过第三个网络来转发分组。

protocol

什么是协议(protocol)?

A protocol defines the format and the order of messages exchanged between two or more communicating entities, as well as the actions taken on the transmission and/or receipt of a message or other event.

bandwidth

在计算机网络中,带宽(bandwidth)是指从网络中的某一点到另一点所能通过的“最高数据率”,单位是比特每秒,记为b/s。有时候bandwidth也会指transmission rate。

时延带宽积

将propagation和bandwidth相乘,就得到了时延带宽积,即时延带宽积=传播时延* 带宽。 时延带宽积又称为以bit为单位的链路长度

RTT

往返时间RTT(Round-Trip Time)表示从发送方发送数据开始,到发送方收到来自接收方的确认,总共经历的时间。包括传播时延,排队时延,处理时延,不包括传输时延(发送时延)。

Internet protocol stack

  1. application: supporting network applications
    FTP, SMTP, HTTP
  2. transport: process-process (进程间)data transfer
    TCP, UDP
  3. network: routing of datagrams (数据报) from source to destination
    IP, routing protocols
  4. link: data transfer between neighboring network elements
    Ethernet, 802.111 (WiFi), PPP
  5. physical: bits “on the wire”

networks under attack: security

history

Exercise

R1

Q:What is the difference between a host and an end system? List several different types of end systems. Is a Web server an end system?

A:There is no difference. Throughout this text, the words “host” and “end system” are used interchangeably. End systems include PCs, workstations, Web servers, mail servers, PDAs, Internet-connected game consoles, etc.

R9

Q:Dial-up modems, HFC, DSL and FTTH are all used for residential access. For each of these access technologies, provide a range of transmission rates and comment on whether the transmission rate is shared or dedicated.

A:Dial up modems: up to 56 Kbps, bandwidth is dedicated; ADSL: up to 24 Mbps downstream and 2.5 Mbps upstream, bandwidth is dedicated; HFC, rates up to 42.8 Mbps and upstream rates of up to 30.7 Mbps, bandwidth is shared. FTTH: 2-10Mbps upload; 10-20 Mbps download; bandwidth is not shared.

R12

Q:What advantage does a circuit-switched network have over a packet-switched network? What advantages does TDM have over FDM in a circuit-switched network?

A:A circuit-switched network can guarantee a certain amount of end-to-end bandwidth for the duration of a call. Most packet-switched networks today (including the Internet) cannot make any end-to-end guarantees for bandwidth. FDM requires sophisticated analog hardware to shift signal into appropriate frequency bands.

R14

Q: Why will two ISPs at the same level of the hierarchy often peer with each other? How does an IXP earn money?

A: 14. If the two ISPs do not peer with each other, then when they send traffic to each other they have to send the traffic through a provider ISP (intermediary), to which they have to pay for carrying the traffic. By peering with each other directly, the two ISPs can reduce their payments to their provider ISPs. An Internet Exchange Points (IXP) (typically in a standalone building with its own switches) is a meeting point where multiple ISPs can connect and/or peer together. An ISP earns its money by charging each of the the ISPs that connect to the IXP a relatively small fee, which may depend on the amount of traffic sent to or received from the IXP.

R16

Q:Consider sending a packet from a source host to a destination host over a fixed route. List the delay components in the end-to-end delay. Which of these delays are constant and which are variable?

A:The delay components are processing delays, transmission delays, propagation delays, and queuing delays. All of these delays are fixed, except for the queuing delays, which are variable.