1-0 The Internet and IP Introduction
- the basics of how the Internet works
- why the Internet is designed and the way that it is
- its strengths and weaknesses
- commonly accepted network designed principles: layering, encapsulation, and packet switching
1-1 A day in the life of an application
“what ultimately make networks interesting are the applications that use them“
David Clark, one of the key contributor to the Internet’s design, once wrote “The current exponential growth of the network seems to show that connectivity is its own reward, and it is more valuable than any individual application such as mail or the World-Wide Web”
“当前网络的指数增长似乎表明连通性是其自身的奖励,它比任何单独的应用程序(如邮件和万维网)都更有价值”
Connectivity is the idea that two computers in different parts of the world can connect to another and exchange data.
The basic model is that you have two computers, each running a program locally, and these two programs communicate over the network. The most common communication model used is a bidirectional, reliable stream of bytes.
one case: HTTP, hyper-text transfer protocol
protocol协议:HTTP 是一个用在计算机世界里的协议。它使用计算机能够理解的语言确立了一种计算机之间交流通信的规范(两个以上的参与者),以及相关的各种控制和错误处理方式(行为约定和规范)。
Transfer传输:我们在上网冲浪时,浏览器是请求方 A,百度网站就是应答方 B。双方约定用 HTTP 协议来通信,于是浏览器把请求数据发送给网站,网站再把一些数据返回给浏览器,最后由浏览器渲染在屏幕,就可以看到图片、视频了
Hyper Text超文本:超越了普通文本的文本,它是文字、图片、视频等的混合体,最关键有超链接,能从一个超文本跳转到另外一个超文本。 HTML 就是最常见的超文本了,它本身只是纯文字文件,但内部用很多标签定义了图片、视频等的链接,再经过浏览器的解释,呈现给我们的就是一个文字、有画面的网页了。
When you see
http://
in your browser, that means it’s communicating using HTTPin HTTP, a client opens a connection to a server and sends commands to it
最常见的命令式GET,它会请求一个页面(requests a page)
HTTP was designed to be a document-centric way for programs to communicate.(HTTP是基于文档document的)
例如,在浏览器地址栏中输入
http://www.stanford.edu/
,浏览器将会与服务器www.stanford.edu
建立一个HTTP连接,并send a GET request for the root page of the site服务器收到请求,检查请求是否有效,并发送response响应(包含numerical code数字代码)
「200 OK」是最常见的成功状态码,表示一切正常。如果是非 HEAD 请求,服务器返回的响应头都会有 body 数据。()
在上面请求
www.stanford.edu
的示例中,a 200 OK response would include the Hyper-Text that describes the main Stanford page.There are other kinds of requests, such as PUT, DELETE, and INFO, as well as other responses such as 400 Bad Request.
But the basic model is simple: client sends a request by writing to the connection, the server reads the request, processes it, and writes a response to the connection, which the client then reads.
- 本文链接:https://wan-nan.github.io/2023/06/25/CS144%E8%AF%BE%E7%A8%8B%E7%AC%94%E8%AE%B0/
- 版权声明:本博客所有文章除特别声明外,均默认采用 许可协议。