What is FTP and what ports does it use?
FTP (File Transfer Protocol) is a standard network protocol used for the transfer of computer files between a client and server on a computer network.
FTP is unique because it uses two separate TCP connections to function:
Because it sends login credentials in plain text, FTP is considered insecure. SFTP (SSH File Transfer Protocol) and FTPS (FTP over SSL) are secure alternatives that encrypt the communication.
What is the loopback address?
A loopback address is a special IP address that computers use to refer to themselves. It allows a device to send a network signal to itself, which is useful for testing network software without any physical network interface being involved.
For IPv4, the entire 127.0.0.0/8
address block is reserved for this purpose, but the most commonly used loopback address is 127.0.0.1
.
For IPv6, the loopback address is ::1
.
Pinging 127.0.0.1
is a common way to test if the TCP/IP stack on a local machine is functioning correctly.
What is TTL?
TTL (Time-to-Live) is a mechanism in the Internet Protocol (IP) that limits the lifespan or lifetime of data in a computer or network.
It is an 8-bit field in the IP header. When a packet is created, the sender sets an initial TTL value (e.g., 64 or 128). Each router that forwards the packet must decrement the TTL value by at least one.
If the TTL value reaches zero before the packet reaches its destination, the router that decremented it to zero discards the packet and sends an ICMP 'Time Exceeded' message back to the sender.
The primary purpose of TTL is to prevent data packets from circulating indefinitely in the network in case of a routing loop.
What is full-duplex and half-duplex?
These terms describe the directionality of data transmission between two devices.
There is also Simplex, where data can only flow in one direction, from sender to receiver (e.g., a radio broadcast).
What is CSMA/CD?
CSMA/CD (Carrier Sense Multiple Access with Collision Detection) is the media access control method used by early Ethernet networks to handle transmissions on a shared medium.
It works as follows:
This method was necessary for hubs, but with modern switched networks where each port is a separate collision domain, CSMA/CD is largely a legacy concept.
What is ICMP?
ICMP (Internet Control Message Protocol) is a supporting protocol in the Internet protocol suite. It is used by network devices, like routers, to send error messages and operational information indicating, for example, that a requested service is not available or that a host or router could not be reached.
ICMP is not used for exchanging user data. Its purpose is purely for control, error-reporting, and management of the network.
The most well-known uses of ICMP are the ping
utility (which uses ICMP Echo Request and Echo Reply messages) and the traceroute
utility (which uses ICMP Time Exceeded messages).
What is a socket in networking?
A network socket is an internal endpoint for sending or receiving data within a node on a computer network. It is a software abstraction that represents one end of a two-way communication link between two programs running on the network.
A socket is uniquely identified by the combination of:
For example, a connection to a web server might be represented by a socket like (198.51.100.10, TCP, Port 443)
.
What is encapsulation?
Encapsulation is the process of adding protocol information (headers and sometimes trailers) to data as it moves down the protocol stack from one layer to the next.
When an application sends data, it passes it down the OSI or TCP/IP model layers. At each layer, a header is added:
The reverse process, de-encapsulation, occurs at the receiving end as the data moves up the stack.
Explain client-server and peer-to-peer network models.
These are two common architectures for network applications.
Client-Server Model:
Peer-to-Peer (P2P) Model:
What are Unicast, Multicast, and Broadcast?
These are three types of data transmission methods in a network: