Stanford CS144笔记(四)

Unit 1 Review

1. What we learned?
  1. How an application uses the internaet.
  2. Thestructure of the Internet: The 4 layer model.
  3. The Internet protocol(IP): Waht it is.
  4. Basic architectural ideas and principles:
    1. Packet switching
    2. Layering
    3. Encapsulation

2. Transport Layer Intro:

In this unit, we'll aks and answer questions such as:

  • How exactly does TCP set up a connection?
  • What do TCP segments look like?
  • How can two computers reliably transfer data with high performance?

3. The TCP Service Model

Connection setup: 3-way handshake

Connection teardown(拆除):

  1. A发送关闭连接请求,B拒绝并继续发送数据。
  2. A发送关闭连接请求,B同意。

The TCP Service Model:

  • Reliable delivery:
    • 接收方在接收数据无误后会发送Acknowledge给发送方。
    • 使用校验和(check sum)检验数据出错。
    • 使用序列号检验数据丢失。
    • 使用流控制(Flow control)来防止淹没接收方。
  • Congestion control:
    TCP使用一些方法为所有TCP连接平均分配网络容量。

The TCP Segment Format:

TCP Segment captured by wireshark

TCP: Port Demultiplexing

Summary
TCP privides in-order, reliable delivery of a stream of bytes between application processes.

4. The UDP Service Model

The UDP Datagram Format

UDP datagram captured by wireshark:

The UDP Service model

使用UDP的应用层协议:

  • DNS
  • DHCP

Summary:
UDP provides a simpler, datagram delivery service between application processes.

5. ICMP(Internet Control Message Protocol) Service Model

ICMP博客
ICMP协议的功能:

  • 差错通知
  • 信息查询
Make the Network Layer Work
  1. The Internet Protocol(IP)
  • The creation of IP datagrams.
  • Hop-by-hop delivery from end to end.
  1. Routing Tables
  • Algorithms to populate router forwarding tables.
  1. Internet Control Message Protocol(ICMP)
  • Communicates network layer information between end hosts and routers.
  • Reports error conditions.
  • Helps us diagnose problems.

ICMP Service

CS专业在读,热爱编程。
专业之外,喜欢阅读,尤爱哲学、金庸、马尔克斯。
原文地址:https://www.cnblogs.com/jmhwsrr/p/14014962.html