Netowork Lab0
environment
https://web.stanford.edu/class/cs144/vm_howto/
username , pwd
cs144, cs144
virtualbox m1 download
https://www.virtualbox.org/wiki/Download_Old_Builds_7_0
visual studio
Checkpoint 0: networking warmup (intro video)
connect to VM
ssh connect server
1 | ip -a |
LAB0
Fetch a Web page
hello
In a Web browser,
visit http://cs144.keithw.org/hello and observe the result.
do the same thing the browser does, by hand.
- On your VM, run telnet cs144.keithw.org http . This tells the telnet
program to open a reliable byte stream between your computer and another
computer (named cs144.keithw.org), and with a particular service running onthat computer: the “http” service, for the Hyper-Text Transfer Protocol, used by
the World Wide Web.1
If your computer has been set up properly and is on the Internet, you will see:
user@computer:~$ telnet cs144.keithw.org http
Trying 104.196.238.229…
Connected to cs144.keithw.org.
Escape character is ‘^]’.
If you need to quit, hold down ctrl and press ] , and then type close . - Type GET /hello HTTP/1.1 . This tells the server the path part of the URL.
(The part starting with the third slash.) - Type Host: cs144.keithw.org . This tells the server the host part of the
URL. (The part between http:// and the third slash.) - Type Connection: close . This tells the server that you are finished
making requests, and it should close the connection as soon as it finishes replying. - Hit the Enter key one more time: . This sends an empty line and tells the
server that you are done with your HTTP request. - If all went well, you will see the same response that your browser saw, preceded
by HTTP headers that tell the browser how to interpret the response
my lab1
Notice, don’t wait for a timeout when you input ‘telnet cs144.keithw.org http’.
1 | cs144@vm:~$ telnet cs144.keithw.org http |
Assignment
http://cs144.keithw.org/lab0/sunjohn
1 | cs144@vm:~$ telnet cs144.keithw.org http |
Send yourself an email
这个应该需要stanford内网,应该不用做
目前课程学到lab0
3.2 Modern C++: mostly safe but still fast and low-level
部分,还是很有意思,后面有时间继续后续的学习.
Netowork Lab0
https://noteforme.github.io/2024/06/08/netowork-lab0/