1/16
These flashcards cover the fundamental concepts of network protocols, the TCP/IP stack, and the sockets API in C as discussed in the lecture.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What is a protocol in the context of communications?
A formal set of rules governing how data is exchanged between two entities, including the syntax of messages and the rules for actions to be taken on certain events.
What is the difference between connection-oriented and connectionless services?
Connection-oriented services involve establishing a connection, using it, and then releasing it (modeled after the telephone system). Connectionless services treat every message as independent, requiring a full destination address for each (modeled after the postal service).
How are reliable and unreliable services defined in networking?
A reliable service provider makes a best-effort attempt to communicate using retransmissions and acknowledgments. An unreliable service throws the message out onto the network without following up on whether it was received.
What is enveloping (or encapsulation) in a protocol stack?
The process where each layer treats data from the layer above as an opaque block and tacks on its own header (or footer) before passing it down. These headers are stripped off at the receiving end.
What are the specific names for messages at the TCP, UDP, IP, and Link layers?
TCP messages are segments, UDP messages are datagrams, IP messages are datagrams or packets, and Link layer messages are frames.
What is the size of an IPv4 address and how is it usually written?
32 bits, typically written in dotted decimal notation consisting of four numbers, each corresponding to a single byte.
In the IP header, what four-bit field allows a system to distinguish between different versions of the protocol?
The version number field, which is the very first field in the header (e.g., 4 for IPv4).
What are the IP protocol numbers for TCP and UDP?
TCP is protocol 6 and UDP is protocol 17.
What does MTU stand for and what is its typical value for Ethernet?
Maximum Transmission Unit; it is typically 1,500 bytes.
What four components uniquely identify a TCP connection?
The combination of the source IP address, the source port number, the destination IP address, and the destination port number.
Why is TCP referred to as a "byte stream" protocol?
Because it provides a continuous stream of bytes like a pipe, where message boundaries are not preserved between the sender and the receiver.
What are well-known ports and ephemeral ports?
Well-known ports are standard ports (0 to 1023) associated with specific services (like port 22 for SSH). Ephemeral ports are short-lived, high-numbered ports (49152 to 65535) typically used by clients to associate with their end of a connection.
Which transport protocol is preferred for real-time video streaming or games, and why?
UDP; it avoids the slowdown of retransmissions and acknowledgments, allowing for faster communication even if some data is lost or corrupted.
What is the purpose of the socket system call accept()?
It is used by a server to accept a connection request, returning a new file descriptor for the connected socket while the original file descriptor remains for listening.
What is the function of getaddrinfo() in C network programming?
It translates hostnames (e.g., "uq.edu.au") and service names (e.g., "http") into IP addresses and port numbers, providing a linked list of addrinfo structures.
What is the loopback address for the local machine in IPv4?
127.0.0.1, often associated with the hostname "localhost".
What byte ordering is used for network addresses?
Big Endian.