Application-layer protocols
แนะนำใหม่
11:12
ทำไมต้องมีการกำหนดโปรโตคอล
คอมพิวเตอร์สองเครื่องต้องการสื่อสารกัน แต่เครื่องหนึ่งส่งข้อมูลในทิศทางหนึ่งและอีกเครื่องคาดหวังต่างออกไปมาก ผลลัพธ์คือข้อมูลไร้ความหมาย — เหมือนคนสองคนที่พูด…
บรรยายภาษาอังกฤษ · สลับคำบรรยายภาษาอังกฤษและภาษาจีนได้
ในบทเรียนนี้
| English | ความหมาย |
|---|---|
| email/ˈiːmeɪl/ | A service for sending and receiving messages over the internet. |
| mail program | Software used to send, receive and manage email messages. |
| download/ˈdaʊnləʊd/ | To receive data from another computer and save it locally. |
| delete/dɪˈliːt/ | To remove a record from a table. |
| server/ˈsɜːvə/ | A computer or program that provides services or resources in response to requests from clients. |
| protocols/ˈprəʊtəkɒlz/ | An agreed set of rules governing communication between devices or systems. |
| application layer/ˌæplɪˈkeɪʃn ˈleɪə/ | ชั้นแอปพลิเคชัน |
| web/web/ | A collection of linked pages and other resources accessed through the internet. |
| file transfer | The process of sending files from one device to another over a network. |
| peer-to-peer/pɪə tə pɪə/ | -peer-to-peer |
| HTTP/ˌeɪtʃ tiː tiː ˈpiː/ | โปรโตคอลการส่งผ่าน超文本 (HTTP) |
| HTTPS/ˌeɪtʃ tiː tiː piː ˈes/ | โปรโตคอลการส่งผ่าน超文本ปลอดภัย (HTTPS) |
| browser | A program used to access and display pages on the web. |
| web pages | Documents on the web that a browser can display. |
| TCP/ˌtiː siː ˈpiː/ | A transport protocol that establishes a connection and delivers data reliably and in order. |
| port/pɔːt/ | In this hardware topic, a physical socket or connection used to attach a peripheral. |
| TLS/ˌtiː el ˈes/ | ความปลอดภัยในการส่งผ่านข้อมูล (TLS) |
| encrypted/enˈkrɪptɪd/ | Changed into a form that cannot be understood without the correct key. |
| ciphertext/ˈsaɪfətekst/ | Information transformed by encryption into a form intended to be unreadable without the appropriate key. |
| certificate/səˈtɪfɪkət/ | A digital document that helps prove the identity of a website. |
| FTP/ˌef tiː ˈpiː/ | โปรโตคอลการถ่ายโอนไฟล์ (FTP) |
| client/ˈklaɪənt/ | A device or program that requests a service or resource from a server. |
| upload | To send data from a device to another computer over a network. |
| credentials | Information used to confirm a user's identity when accessing a system. |
| SMTP/ˌes em tiː ˈpiː/ | โปรโตคอลการส่งอีเมลแบบง่าย (SMTP) |
| POP3/pɒp ˈθriː/ | Download mail to one device, usually deleting it from the server. |
| IMAP/ˈaɪmæp/ | โปรโตคอลเข้าถึงอีเมลอินเทอร์เน็ต (IMAP) |
| internet/ˈɪntənet/ | A worldwide system of interconnected networks using Internet Protocol. |
| push/pʊʃ/ | To send data to another computer without waiting for a request. |
| synchronises | Keeps data and its state consistent across a server and devices. |
| folders | Containers used to organise files and other folders in a file system. |
| read flags | Marks that record whether messages have been read. |
| frames/freɪmz/ | Individual images shown in sequence to make a video. |
| BitTorrent/bɪt ˈtɒrənt/ | A peer-to-peer protocol: there is no single server holding the file for everyone. |
| tracker/ˈtrækə/ | A server that helps computers sharing a file find each other. |
| peers | Computers that share file pieces directly with one another. |
| in parallel/ɪn ˈpærəlel/ | At the same time, rather than one after another. |
| bandwidth/ˈbændwɪdθ/ | The frequency range carried by a signal or channel; in networking, often used for its data transfer capacity. |
| operating system/ˈɒpəreɪtɪŋ ˈsɪstəm/ | System software that manages hardware resources and provides services for applications. |
| bottleneck/ˈbɒtəlnek/ | A part of a system that limits its overall speed or capacity. |
| single point of failure/ˈsɪŋɡl pɔɪnt ɒv ˈfeɪlɪə/ | One part whose failure can cause the whole system to stop working. |
| authenticated/ɔːˈθentɪkeɪtɪd/ | Describes an identity that has been checked and confirmed. |
ทำไมกล่องจดหมายของคุณจึงเหมือนกันบนทุกอุปกรณ์
- เปิดอีเมลของคุณบนแล็ปท็อป จากนั้นบนโทรศัพท์ ข้อความเดียวกันมีอยู่ และข้อความที่คุณอ่านแล้วจะถูกทำเครื่องหมายว่าอ่านแล้วบนทั้งสองเครื่อง
- That is not obvious. For twenty years the normal thing was for a mail program to download everything and delete it from the server, so whichever device fetched the mail first was the only one that had it.
- ทั้งสองพฤติกรรมยังคงถูกใช้งานอยู่ และการเลือกระหว่างพวกเขาคือการเลือกระหว่างโปรโตคอลสองตัวที่มีงานเดียวกันแต่ออกแบบตรงกันข้าม
- บทเรียนนี้เกี่ยวกับ ชั้นแอปพลิเคชัน โปรโตคอลที่หลักสูตรระบุ: เวิลด์ไวด์เวบ การถ่ายโอนไฟล์ โปรโตคอลอีเมลสามชนิด และการสื่อสารแบบ Peer-to-Peer
เวิลด์ไวด์เวบ: HTTP และ HTTPS
- HTTP เป็นวิธีการที่ browser ดึงหน้าเว็บและทรัพยากรจากเซิร์ฟเวอร์ มันทำงานผ่าน TCP โดยปกติบนพอร์ต 80
- HTTPS คือHTTPที่ถูกห่อหุ้มภายใน TLS ทำให้การจราจรข้อมูลถูกเข้ารหัส ใช้พอร์ต 443
- What HTTPS adds: an eavesdropper on the path sees only ciphertext, the server proves its identity with a certificate, and any tampering is detected. Use it whenever the data is private, which today means always.
Network route lab
Follow data from a device through network hardware and protocols.
HTTPS is:
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
HTTPS runs HTTP over TLS encryption (port 443), protecting the data in transit.
What does HTTPS add over plain HTTP? Select ทั้งหมด that apply.
ความยาก 2/5 · 140 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
TLS supplies confidentiality, authentication and integrity. Compression is a separate feature of HTTP itself.
การถ่ายโอนไฟล์: FTP
- FTP transfers files between a client and a server: upload, download, list, rename and delete.
- ออกแบบมาสำหรับไฟล์ทั้งไฟล์ ในขณะที่ HTTP ออกแบบมาสำหรับเอกสารและทรัพยากรที่เบราว์เซอร์แสดง
- Plain FTP sends its credentials in the clear, which is why secured variants replaced it for anything sensitive.
อีเมล: SMTP, POP3 และ IMAP
- SMTP sends mail: from the client to its outgoing server, and from server to server across the internet. It is the push half of email.
- POP33 ดาวน์โหลด อีเมลเข้าเครื่องเดียวและมัก ลบออกจากเซิร์ฟเวอร์. อีเมลจะอาศัยอยู่ที่อุปกรณ์นั้น
- IMAP ทิ้ง อีเมลไว้บนเซิร์ฟเวอร์และ ซิงโครไนซ์ สถานะ แฟ้ม ชื่อแสดงว่าอ่านแล้ว การลบAcross every device The mail lives on the server.

โปรโตคอลทั้งหมดเหล่านี้จบลงภายใน frames แบบนี้
Which protocol is used to SEND email?
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
SMTP sends mail; POP3 and IMAP are used to receive/read it.
IMAP leaves mail on the server and syncs it across all your devices, while POP3 typically downloads the mail and deletes it from the server.
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
That is why IMAP shows the same inbox on your phone and laptop, whereas POP3 ties mail to one device.
ตัวอย่างทำโจทย์: เลือกโปรโตคอลอีเมล
- ผู้ใช้คนหนึ่งอ่านอีเมลบนโทรศัพท์ แล็ปท็อป และเดสก์ท็อป และต้องการ inbox เดียวกันบนทั้งสาม Which receiving protocol, และทำไม?
- IMAP: ข้อความจะคงอยู่บนเซิร์ฟเวอร์และ client ซิงโครไนซ์กับมัน ดังนั้นข้อความที่อ่านหรือจัดหมวดหมู่บนอุปกรณ์หนึ่งจะแสดงว่าเป็นอ่านแล้วหรือจัดหมวดหมู่บนอุปกรณ์อื่นๆ
- ผู้ใช้คนหนึ่งมีแล็ปท็อปเก่าเครื่องหนึ่ง, Quota mailbox เล็กมาก และมักไม่มีอินเทอร์เน็ต. POP3: อีเมลถูกดาวน์โหลดเข้าแล็ปท็อปและถูกลบออกจากเซิร์ฟเวอร์ ซึ่งช่วยประหยัด quota และทำให้สามารถอ่านได้แบบ offline
- The deciding facts are how many devices and where the mail must live. SMTP is not an answer to either: it sends.

A user reads mail on three devices and wants read messages marked read everywhere. Which protocol receives the mail?
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
IMAP leaves the mail on the server and synchronises state across devices. POP3 downloads to one device and usually deletes; SMTP sends.
POP3 downloads mail to one device and usually ____ it from the server.
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
That frees the mailbox quota and suits a single device used offline, but the mail then exists only on that device.
Peer-to-peer: BitTorrent
- BitTorrent เป็นโปรโตคอลแบบ พีทูพีพี: ไม่มีเซิร์ฟเวอร์เดียวที่เก็บไฟล์ไว้สำหรับทุกคน
- The file is split into pieces. A tracker helps peers find each other, and each peer then downloads pieces from many other peers in parallel while uploading the pieces it already has.
- The effect: the more popular a file, the more peers there are to serve it, so the load spreads instead of concentrating. A single server would need bandwidth proportional to the number of downloaders.

*Every downloader ก็เป็น uploader เช่นกัน
BitTorrent reduces load on any single server because it:
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
As a peer-to-peer protocol, each peer shares pieces, so no single server carries the whole load.
ตัวอย่างทำโจทย์: ทำไม peer-to-peer สำหรับ release ขนาดใหญ่
- *ระบบปฏิบัติการฟรีถูกปล่อยออกมาเป็นไฟล์ 4 GB และมีคนดาวน์โหลดหนึ่งล้านคนในวันแรก อธิบายว่าทำไม BitTorrent จึงเหมาะกว่าเซิร์ฟเวอร์เว็บเดียว
- ด้วย HTTP, One server ต้องส่ง 4 GB จำนวนหนึ่งล้านครั้ง, ดังนั้น bandwidth และต้นทุนจะ scale กับจำนวน downloaders, และมันจะกลายเป็น bottleneck และจุดล้มเหลวเดียว
- ด้วย BitTorrent, ไฟล์ถูกแบ่งเป็น pieces และแต่ละ peer upload pieces ที่มันได้รับไปแล้ว, ดังนั้น capacity เพิ่มขึ้นตามจำนวน downloaders Instead of ถูกใช้ไปโดยพวกเขา
- The answer names the load, says where it goes, and says what happens as demand rises.

With BitTorrent, the more people download a file, the more capacity there is to serve it.
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
Every peer uploads the pieces it already has, so capacity grows with demand. A single server's bandwidth is consumed by demand instead.
โปรโตคอลโดยสังเขป
| โปรโตคอล | งาน |
|---|---|
| HTTP | ดึงหน้าเว็บ, port 80 ผ่าน TCP |
| HTTPS | HTTP ภายใน TLS, เข้ารหัสแล้ว, port 443 |
| FTP | โอนไฟล์ทั้งไฟล์เข้าและออกจากเซิร์ฟเวอร์ |
| SMTP | ส่งอีเมล, จาก client ไปยัง server และ server ไปยัง server |
| POP3 | ดาวน์โหลดอีเมลเข้าเครื่องเดียว, มักลบออกจากเซิร์ฟเวอร์ |
| IMAP | ทิ้งอีเมลไว้บนเซิร์ฟเวอร์, ซิงโครไนซ์ Across อุปกรณ์ |
| BitTorrent | แชร์ file pieces แบบ peer-to-peer |

Match each protocol to its use.
ความยาก 2/5 · 140 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
HTTP = web, FTP = files, SMTP = sending email (POP3/IMAP receive it).
คะแนนที่หลุดหายไป
- SMTP ส่ง; POP3 และ IMAP รับ. คำถามถามว่าการส่งอีเมลทำอย่างไร มีคำตอบเพียงข้อเดียว
- ความแตกต่างระหว่าง IMAP กับ POP3 คือ ตำแหน่งที่อีเมลถูกจัดเก็บ: อยู่บนเซิร์ฟเวอร์และซิงโครไนซ์ หรือดาวน์โหลดแล้วลบออก
- HTTPS ไม่ใช่โปรโตคอลต่างจาก HTTP; มันคือ HTTP over TLS, และ TLS คือสิ่งที่เพิ่มการเข้ารหัส
- BitTorrent กระจาย load เพราะ every peer upload. "เร็วขึ้น" โดยไม่มีเหตุผลนี้จะไม่ได้คะแนน
คุณเข้าใจแล้ว
- HTTP ดึงหน้าเว็บผ่าน TCP; HTTPS เป็นโปรโตคอลเดียวกันแต่อยู่ภายใน TLS ซึ่งมีการเข้ารหัสและตรวจสอบความถูกต้อง; FTP ใช้ถ่ายโอนไฟล์ทั้งไฟล์
- SMTP ส่งอีเมล; POP3 ดาวน์โหลดและมักลบออก; IMAP ทิ้งไว้บนเซิร์ฟเวอร์และซิงโครไนซ์ทุกอุปกรณ์
- เลือกโปรโตคอลอีเมลตามจำนวนอุปกรณ์และตำแหน่งที่อีเมลควรถูกจัดเก็บ
- BitTorrent เป็น peer-to-peer: pieces จากหลาย peers พร้อมกัน, Every downloader ก็ upload, ดังนั้น capacity เพิ่มตาม demand
เกิดปัญหาอะไรขึ้น? เฉพาะทีมเว็บไซต์เท่านั้นที่เห็นข้อมูลนี้