Describe the operation of several network protocols at a high level.
sobes.tech AI
Answer from AI
FTP is designed for transferring files between a client and a server. It uses two connections: a control connection (TCP port 21) for commands and responses, and a data connection (TCP port 20 or another dynamic port) for file transfer.
HTTP (S) is a data exchange protocol between a client and a server on the World Wide Web. The client (browser) sends a request to the server, which processes it and sends a response. It runs over TCP/IP. HTTPS adds encryption (TLS/SSL) for secure data transfer.
WebSocket is a protocol for full-duplex, two-way communication over a single TCP connection. It allows the server to send data to the client at any time without a prior request. It is used for interactive applications, chats, online games.
DNS translates domain names into IP addresses. The client (browser) requests an IP address from the DNS server, which either returns the IP address or redirects the request to other DNS servers. It uses UDP (port 53) for quick requests and TCP (port 53) for larger responses or zone transfers.
TCP provides reliable data delivery with error checking and packet ordering. It establishes a connection (three-way handshake), sends data with acknowledgments, and manages flow control.
UDP is a connectionless protocol. It offers higher speed but without delivery guarantees and ordering. It is used for streaming audio/video, online gaming, DNS.