计算机网络学习笔记(一) 计算机网络及互联网 Chapter1-Computer NetWorks and the Internet

目录

      • 一. What is the Internet
      • 二、The Network Edge
        • 2.1 Access Networks
        • 2.2 Physical Media
      • 三、The Network Core
        • 3.1 Package Switching 分组交换
        • 3.2 Circuit Switching 电路交换
        • 3.3 A Network of Networks
      • 四. Delay, Loss, and Throughput in Packet-Switched Networks
        • 4.1 delay(together to be total nodal delay)
        • 4.2 Queuing Delay and Packet Loss
        • 4.3 End-to-End Delay
        • 4.4 Throughput in Computer Networks
      • 五、Protocol Layers and Their Service Models
        • 5.1 Layered Architecture
        • 5.2 Protocol Layering
        • 5.3 Encapsulation 封装
      • 六、Networks Under Attack

本系列博客是作者阅读《ComputerNetworking-A Top-Down Approach 7th Edition》(计算机网络-自顶向下方法第七版)所做的笔记。
第一章为Introduction,内容比较多。

  • 首先从互联网的构成以及互联网提供的服务两方面介绍了什么是互联网。
  • 然后介绍了互联网边缘,可以简单理解为我们要联网时首先接触到的部分,包括各种接入网的方式(拨号上网等)以及物理媒介(光纤等)。
  • 接着介绍了互联网核心,探讨了两种数据传输的方式:分组交换以及电路交换。然后详细解释了互联网是各级网络互连形成的庞大网络。
  • 第四部分和第六部分分别介绍了网络延迟、丢包、以及网络安全等方面的知识。
  • 第五部分是核心内容,介绍了网络的协议分层,简单形象的说明了每一层的功能以及对数据的处理(封装),并列举了每一层中相关的协议,这些知识在之后的章节中都会详细介绍。

一. What is the Internet

  1. 所有连接到互联网的设备都可以被称作主机 hosts /终端 end systems
  2. End systems are connected together by a network of communication links and packet switches.
  3. Internet is an infrastructure that provides services to applications.
  4. End systems attached to the Internet provide a socket interface that specifies how a program running on one end system asks the Internet to deliver data to a specific destination program running on another end system.

二、The Network Edge

2.1 Access Networks

  1. Access Networks: the network that physically connects an end system to the first router (also known as the “edge router”) on a path from the end system to any other distant end system.

  2. Home Access: DSL, Cable, FTTH, Dial-Up, and Satellite

    1. DSL: digital subscriber line(数字用户线路)。
      计算机网络学习笔记(一) 计算机网络及互联网 Chapter1-Computer NetWorks and the Internet_第1张图片
          家中的DSL调制解调器(也就是我们常说的)将电信信号转换成高频音,通过电话线传给CO(Central office), CO中的DSLAM(digital subscriber line access multiplexer 数字用户线路接入复用器)可以把数据和电话信号分割开,并将数据送到Internet。 家中的分频器Splitter可以将收到的数据/电话信号分隔开来。电话线用不同的频段区分电话信道、下行信道和上行信道。

    2. cable Internet access - HFC 电缆因特网接入

      计算机网络学习笔记(一) 计算机网络及互联网 Chapter1-Computer NetWorks and the Internet_第2张图片

      ​ 利用的是有线电视基础设施。家中的电缆调制解调器(另一种猫),通过一个以太网(Ethernet)端口连接到PC。数据通过电缆传输,电缆连接到 neighborhood-level junctions 并由光纤接入到 Cable head end,这里有类似于DSLAM的CMTS(Cable Modem Termination System)将模拟信号转换成数字信号。因为这个系统同时使用了光纤和同轴电缆,所以常被称作HFC (Hybrid Fiber Coax 混合光纤同轴)。由于电缆是共享的,由Cable head end发送的package会被发送到每个家庭,所以多个用户同时下载时会感到网速变慢。

    3. FTTH (Fiber To The Home)光纤到户

      计算机网络学习笔记(一) 计算机网络及互联网 Chapter1-Computer NetWorks and the Internet_第3张图片

      CO与家庭间不借助于其他基础设施,而是通过光纤传输。除每户单独享受一根光纤外,更普遍的是连接到CO的光纤由多户共享,只有快到用户的时候才分开。划分有两种光纤分布体系结构,AONs和PONs(主动/被动光纤网络),AON本质上是 switched Ethernet。 PON如上图,用户家中的ONT(optical network terminator)被连接到splitter,splitter通过共享的光纤,将数据传到CO,由OLT(Optical Line Terminator)进行光/电信号弟弟转换,然后通过路由器与Internet连接。在ONT体系结构中,所有从OLT发送到splitter中的package在splitter中进行复制。

    4. Dial-Up(速度慢,通常用于没有上述三种方式的农村)

    5. Satellite(同4)

  3. Access in the Enterprise (and the Home): Ethernet and WiFi

    在公司/家中,我们通过LAN(local area network局域网)将end systems连接到 edge router。

    1. Ethernet 以太网

      计算机网络学习笔记(一) 计算机网络及互联网 Chapter1-Computer NetWorks and the Internet_第4张图片

      ​ 主机通过双绞线与交换机/交换机网络相连,再与Internet相连。

    2. WiFi

      在无线LAN环境中,用户发送数据给Access Point, access point与企业网连接(很有可能是有线以太网),企业网连接到Internet。用户与接入点的距离在十几米内。

  4. Wide-Area Wireless Access: 3G and LTE

    ​ 利用移动电话cellular telephone已有的基础设施,与基站发送数据,不同于WiFi,用户可以在与基站十几千米内享受网络服务。

2.2 Physical Media

  1. guided media: the waves are guided along a solid medium
    • Twisted-Pair Copper Wire: 双绞铜线 拨号上网,DSL等
    • Coaxial Cable: 同轴电缆 电缆电视,用作shared medium
    • Fiber Optics:光纤
  2. unguided media: the waves propagate in the atmosphere and in the outer space
    • Terrestrial Radio Channels 陆地无线电信道
    • Satellite Radio Channels:卫星无线电信道

三、The Network Core

The network core—the mesh of packet switches and links that interconnects the Internet’s end systems.

There are two fundamental approaches to moving data through a network of links and switches: 
 circuit switching and package switching.
 package switching:分组交换不适合实时服务,但是更简单、高效、实现简单,且宽带共享更好。
 circuit switching:电路交换是可靠的,但是效率低。

3.1 Package Switching 分组交换

  1. Store-and-Forward Transmission: Most Package switches use store-and-forward transmission at the inputs to the links. The router will buffer(store) the package’s bits until the it has received the entire package. Then it transmits the package onto the outbound link
  2. Queue delay: packages queue in the link’s output buffer before being transmitted onto the link. When the buffer is completely full with other packages waiting for transmission, packet loss will occur.
  3. Forwarding Tables and Routing Protocols: each router has a forwarding table that
    maps destination addresses (IP address or portions of the destination addresses) to that router’s outbound links. Internet has a number of special routing protocols that are used to automatically set the forwarding tables. 如最短路径算法

3.2 Circuit Switching 电路交换

  1. 发送者和接收者之间建立通路,这条通路预留了传输速率,缓存大小等信息,所以是可靠的。Before the sender can send the information, the network must establish a connection (circuit) between the sender and the receiver. Since a given transmission rate has been reserved for this sender-to-receiver connection, the sender can transfer the data to the receiver at the guaranteed constant rate.

  2. 复用技术:频分复用和时分复用。A circuit in a link is implemented with either frequency-division multiplexing (FDM) or time-division multiplexing (TDM)。

    计算机网络学习笔记(一) 计算机网络及互联网 Chapter1-Computer NetWorks and the Internet_第5张图片

3.3 A Network of Networks

计算机网络学习笔记(一) 计算机网络及互联网 Chapter1-Computer NetWorks and the Internet_第6张图片

四. Delay, Loss, and Throughput in Packet-Switched Networks

4.1 delay(together to be total nodal delay)

  1. nodal processing delay
  2. queuing delay
  3. transmission delay (total-length/rate) package内所有bit通过router的时间
  4. propagation delay (distance/speed) package从一个router到另一个router的时间

4.2 Queuing Delay and Packet Loss

4.3 End-to-End Delay

​ End System, Application, and Other Delays
purposefully delay for sharing the medium with other end systems; packetization delay

4.4 Throughput in Computer Networks

instantaneous throughput: the rate (in bits/sec) at which Host B is receiving the file

average throughput: file size/time

五、Protocol Layers and Their Service Models

5.1 Layered Architecture

adventages:

  1. performing certain actions within that layer
  2. using the services of the layer directly below it
  3. As long as the layer provides the same service to the layer above it, and uses the same services from the layer below it, the remainder of the system remains unchanged when a layer’s implementation is changed.

drawbacks:

  1. one layer may duplicate lower-layer functionality. For example, many protocol stacks provide error recovery on both a per-link basis and an end-to-end basis.
  2. functionality at one layer may need information (for example, a timestamp value) that is present only in another layer; this violates the goal of separation of layers.

5.2 Protocol Layering

计算机网络学习笔记(一) 计算机网络及互联网 Chapter1-Computer NetWorks and the Internet_第7张图片

  1. Application Layer:应用层,包括网络应用程序以及应用层协议。包括提供web文档请求和传输服务的HTTP、发送接收电子邮件的SMTP、主机间发送文件的FTP等。以及转换域名的DNS。在应用层里传送的packages叫做message报文
  2. Transport Layer: 传输层,transport application-layer messages between application endpoints. 包括两种协议:TCPUDP。TCP提供面向连接的可靠服务,而且能进行流量控制。TCP会把messages切分成segment,并提供拥塞控制。UDP但是无连接的,没有可靠性、流量控制和拥塞控制的服务。 在传输层传送的packages叫做segment
  3. Network Layer:网络层,负责将datagrams从一台主机host传送到另一台主机host。包含IP协议以及许多routing protocols路由协议。TCP/UDP发送transport-layer segment以及destination address到网络层。
  4. Link Layer:链路层,网络层将datagrams从source路由到destination时,会经过一系列node(host or router),datagram从一个node到另一个node的传输依赖链路层提供的服务。包括一系列协议: Ethernet, WiFi, cable access network’s DOCSIS protocol. 在链路层传送的package叫做frames
  5. Physical Layer:物理层,负责将链路层要传送的frame中的individual bits发送到下一个node。物理层依赖于link,与link medium有关,不同的材质中比特传输的方式也不同。
	在OSI模型中有两层是五层分层中没有提到的。
	Presentation Layer表示层:负责data compression数据压缩、data encryption加密以及data description处理数据format,
	Session Layer会话层:delimiting and synchronization of data exchange, including the means to build a checkpointing and recovery scheme.
	现实中这两层的服务由应用开发者自己提供。

5.3 Encapsulation 封装

计算机网络学习笔记(一) 计算机网络及互联网 Chapter1-Computer NetWorks and the Internet_第8张图片

​ routers 与 link-layer switches都是packet switches。router实现了1-3层协议,可以识别ip地址,而link-layer switch值实现了1-2层协议,只能识别 Ethernet address。host实现了全部的五层协议。

​ host发送application-layer message,传到传输层。传输层添加head information,接收方的传输层可以根据该信息将message传到合适的application并且进行error-detection。头信息与应用层报文共同组成了传输层的segment。传输层将segment传到网络层,网络层添加包含了发送方-接收方ip地址信息在内的头信息,构成网络层datagram。datagram传到链路层,添加特定的链路层头信息,构成链路层frame。每一层的package都是由header fieldspayload field(来自上一层)构成的。

六、Networks Under Attack

  1. Viruses are malware that require some form of user interaction to infect
    the user’s device. 如邮件附件中的病毒,需要用户点击交互。
  2. Worms are malware that can enter a device without any explicit user interaction.
  3. DoS attacks:denial-of-service (DoS) attacks。a DoS attack renders a network, host, or other piece of infrastructure unusable by legitimate users. Web servers, e-mail servers, DNS servers, and institutional networks can all be subject to DoS attacks.
    • Vulnerability attack: 发送准备好的攻击弱点的messages
    • Bandwidth flooding: 发送大量的packages到主机
    • Connection flooding:与主机建立大量fully open或half-open的TCP connections
  4. packet sniffer: A passive receiver that records a copy of every packet that flies by
  5. IP spoofing:伪造报文

你可能感兴趣的:(计算机网络)