chapter 1 Introduction to IP


Introduction to IP

image-20220929220935497

1.1. what is the Internet?

what is the Internet? (具体角度)

  1. billions of connected computing devices+running network apps

    👉hosts = end systems

    主机以及其上运行的程序称为主机节点(🔲

  2. communication links(通信链路):

    fiber, copper, radio, satellite(光纤、铜、无线电、卫星)

    transmission rate = bandwidth

  3. packet switches(分组交换机):

    路由器(网络层)、链路层交换机(数据链路层)都为switch的一种

    路由器(routers)/交换机(packet switches)👉数据交换节点(

ISP (Internet Service Provider)

  1. [Internet: “network of networks”](#1.3. Internet structure: network of networks)

    网络的网络:Interconnected Internet Service Providers (ISPs)

    ISP的小网络之间的互联

  2. [**protocols** control sending, receiving of messages](#What’s a protocol?)
TCP Transmission Control Protocol
IP Internet Protocol
HTTP HyperText Transfer Protocol
802.11 WiFi standard
  1. Internet standards

    • RFC: Request for comments

    • IETF: Internet Engineering Task Force

What’s the Internet? a service view

  1. infrastructure that provides services to applications:

    Web, VoIP (Voice over IP), email, games, e-commerce, social nets

  2. provides programming interface to apps

    为APP提供编程接口

    hooks that allow sending and receiving app programs to “ connect ” to Internet

    将发送接收数据的互联网app联系起来

    provides service options, like postal service:

    • 无连接不可靠服务

    • 面向连接的可靠服务

What’s a protocol?

network protocols:

protocols define format, order of messages sent and received among network entities, and actions taken on message transmission, receipt

协议定义了在两个或多个通信实体之间交换的 报文格式和次序,以及在报文传输和/或接收或其他事件方面所采取的动作

all communication activity in Internet governed by protocol

image-20220909090952782

TCP协议:两个端先进行握手通信再传数据

1.2. network structure:

image-20220909091829857

  1. network edge(图中小框):

    • hosts: clients and servers
    • part of the network with the users and computers
  2. access networks, physical media:

    接入网、物理媒介

    • wired, wireless communication links
  3. network core(图中大圈):

    • interconnected routers (路由器互联)
    • network of networks

Access networks and physical media

Access networks:

These networks connect end users to the rest of the internet.

image-20220909092751743

接入网的方式:

  • residential access nets

  • institutional access networks (school, company)

  • mobile access networks

    bandwidth (bits per second)

shared or dedicated(专用)

Physical media

Physical media represent the actual hardware that carries the data.

image-20220912104033330
补充:bits and bytes

​ A bit is a “binary digit” – a single 0 or 1

​ A byte is a group of eight bits – can be thought of as a number from 0 to 255

注意大小写:

image-20220909093220997

network edge

  • packets(分组)

​ 主机: 信息通过分组的形式发送

image-20220912102944537
  • 分组交换:以分组为单位存储转发

  • Host: sends packets of data

    takes application message breaks into smaller chunks, known as packets, of length L bits

    transmits packet into access network at transmission rate R

    link transmission rate, aka link capacity, aka link bandwidth

image-20220912103639908

network core

  • mesh of interconnected routers(互联路由的网状结构)

  • packet-switching: hosts break application-layer messages into packets

  • forward packets from one router to the next, across links on path from source to destination

    路由器的store-and-forward方式:

    利用该方式在网络中传递数据

    store and forward: entire packet must arrive at router before it can be transmitted on next link链路

    takes L/R seconds to transmit (push out) L-bit packet into link at R bps

    路由器之间一小段称为hop

    image-20220913133042283

    one-hop numerical example:

    L = 7.5 Mbits

    R = 1.5 Mbps

    ▪ one-hop transmission delay = 5 sec

image-20220913133119730

Two key network-core functions
image-20220912110605649

路由: 决定分组采用的源到目标的路径

转发: 将分组从路由器的输 入链路转移到输出链路

example:

Edge or core ?image-20220912151910856

1.3. Internet structure: network of networks

End systems connect to Internet via access ISPs (Internet Service Providers)

▪ Access ISPs in turn must be interconnected. so that any two hosts can send packets to each other

连接方式

  • connect each access ISP to one global transit ISP (internet service providers) 服务提供商

Customer and provider ISPs have economic agreement.

image-20220912143642633
  • there will be competitors which must be interconnected and regional networks may arise to connect access nets to ISPs

  • and regional networks may arise to connect access nets to ISPs

​ way of interconnected: 1. Peering link 对等连接

​ 2. internet exchange point(IXP) 交换点

  • content provider networks(内容提供商) (e.g., Google, Microsoft, Akamai) may run their own network, to bring services, content close to end users

content provider networks在全球布置机房(离ISP很近)在全球用自己的电缆相连跳过全球ISP,基于ISP

image-20220912144709676
  • at center: small of well-connected large networks:

    一些为数不多的充分连接的大范围网络(分布广、节点有限、但是之间有着多重连接)

image-20220912145443268

• “tier-1” commercial ISPs (e.g., Level 3, Sprint, AT&T, NTT), ==national & international coverage==

• content provider network (e.g., Google): private network that connects it data centers to Internet, ==often bypassing tier-1, regional ISPs==(因为诸如谷歌之类的大型content provider network在世界范围内有大量独立的数据中心,它们之间连接可以bypass tier 1 ISP,但是要与底层ISP连接,目的是更方便的与客户相连)

image-20220912150203735

example image-20220913134200366

1.4. How do loss and delay occur

packets queue in router buffers (在路由器缓冲区的分组队列)

packet arrival rate to link (temporarily) exceeds output link capacity

queuing and loss:

▪ if arrival rate (in bits) to link exceeds transmission rate of link for a period of time:

• packets will queue, wait to be transmitted on link

• packets can be dropped (lost) if memory (buffer) fills up

packets queue, wait for turn(分组等待排到队头、被传输)

image-20220912153048590

Four sources of packet delay

image-20220912153216147

(1) dproc : nodal processing(确定的)

  • check bit errors

  • determine output link(决定输出的链)

  • typically < msec

(2) dqueue: queueing delay(随机的)

  • time waiting at output link for transmission

  • depends on congestion level of router

(3)dtrans: transmission delay(理解为出路由器的时间)

  • L: packet length (bits)

  • R: link bandwidth (bps)

  • dtrans = L/R

(4)dprop: propagation delay(媒介里跑的时间):

  • d: length of physical link

  • s: propagation speed (~2x10e8 m/sec) (电磁波在媒介的传播速度)

  • dprop = d/s

Packet loss

The queue( buffer )capacity of the link is limited

packet arriving to full queue dropped (aka lost)

lost packet may be retransmitted by previous node, by source end system, or not at all

image-20220912154250000

Throughput

  • 吞吐量: 在源端和目标端之间传输的速率(数据量/单位时间)

    instantaneous: rate at given point in time

    average: rate over longer period of time

  • per-connection end-end throughput: ==min(Rc ,Rs,R/10)==

image-20220912161830983

image-20220912162249887

  • Bottleneck:

    link on end-end path that constrains end-end throughput

image-20220912162220109

1.5. Internet model

Why layering?

explicit structure allows identification, relationship of complex system’s pieces

modularization eases maintenance, updating of system

Helps with complexity: break a complex design task into several smaller ones

概念化:结构清晰,便于标示网络组件,以及描述其相互关系

结构化:模块化更易于维护和系统升级 改变某一层服务的实现不影响系统中的其他层次

TCP/IP model

Transmission Control Protocol/Internet Protocol

application: supporting network applications

• FTP, SMTP, HTTP

transport: process-process(进程到进程) data transfer

• TCP, UDP

network: routing of datagrams from source to destination

• IP, routing protocols

• Ethernet, 802.111 (WiFi), PPP

physical: bits “on the wire”

image-20220912163145761

ISO/OSI reference model

  • ISO = International Standards Office

  • OSI = Open Systems Interconnection

    image-20220929214205207

presentation(表示层) (layer 6): allow applications to interpret meaning of data e.g.encryption, compression, machine

specific conventions

允许应用解释传输的数据(加密压缩数据)

• In working Internet this is at the application layer.

session(会话层) (layer 5): synchronization, checkpointing, recovery of data exchange

建立管理会话

  • In working Internet this is at the application layer.

ISO/OSI (left) vs TCP/IP (right)

image-20220912163625721

layers: each layer implements a service

▪ via its own internal-layer actions

▪ relying on services provided by layer below

Layering and headers(头部信息)

Most layers of the TCP/IP model are associated with a particular type of “header”

  • header信息包括:

• Information separate from the data being sent that says things about that data.

• Which computer is it being sent to?

• Which program on that computer must receive it?

• How long is this data?

  • header+information 封装成PDU(Protocol Data Unit)

包含来自上层的信息,以及当前层的实体附加的信息

image-20220912173056761
各layers的headers:

下层包括上层的header

At each lower layer a new header is added incorporating the headers underneath. A layer 2 packet has a layer 2 header but includes headers from layer 3 and 4.

image-20220912165219586

Encapsulation

一步步加header 的过程

image-20220912165327362

在发送机一个application-layer messages被发送给transport,transport收取信息(M)并附上自己的header(Ht)encapsulate成image-20220912165631349这段报文将被destination的transport解封利用

  • switch是layer-3的设备

    image-20220929215152100

    it reads a layer 2 address and works out which nearby computer should get a message

  • router是layer-2的设备

    image-20220929215118747

    it reads a layer 3 address and works out which direction a packet should go.

  • repeater(中继器)是layer-1的设备

    it strengthens or reconstructs a corrupted signal and carries on sending it.