What are the 7 layers of the OSI model?
Application, Presentation, Session, Transport, Network, Data Link, Physical.
What are the 4 layers of the TCP/IP model?
Application, Transport, Internet, Network Access.
What is the purpose of the Transport Layer?
Provides reliable or unreliable end-to-end data transfer (TCP/UDP).
What does TCP stand for and what are its characteristics?
Transmission Control Protocol – reliable, ordered, connection-oriented.
What does UDP stand for and what are its characteristics?
User Datagram Protocol – connectionless, fast, no guaranteed delivery.
Describe the TCP 3-way handshake.
SYN → SYN-ACK → ACK establishes a connection.
Describe the TCP 4-way teardown.
FIN → ACK → FIN → ACK closes a connection gracefully.
What port does HTTP use?
TCP port 80.
What port does HTTPS use?
TCP port 443.
What protocol is used for diagnostic and error reporting in IP networks?
ICMP (Internet Control Message Protocol).
What tool sends ICMP echo requests to check connectivity?
ping
What does traceroute do?
Displays the path packets take to a host by incrementing TTL values.
What command shows active network connections and ports?
netstat -tulnp or ss -tulnp
What command displays routing table entries?
route -n or ip route show
What is a routing table?
A list of network paths specifying how packets are forwarded to destinations.
What is a default gateway?
A router used to send packets to networks not directly reachable.
Used for traffic outside your local subnet. Systems exit door to the internet.
What command shows network interfaces and IP addresses?
ip addr show
What is ARP used for?
Maps IP addresses to MAC addresses on a local network.
What is DNS?
Domain Name System – resolves domain names to IP addresses.
What port does DNS use by default?
UDP port 53 (and TCP for large responses).
What is TTL in DNS?
Time-To-Live – how long DNS records are cached.
What is the difference between recursive and iterative DNS queries?
Recursive: resolver fetches final answer; Iterative: resolver gets referrals step by step.
Client makes recursive query to resolver (8.8.8.8)
Resolver makes iterative queries from there.
What command checks DNS resolution manually?
dig or nslookup.
What are sockets in networking?
Endpoints for bidirectional communication identified by IP and port.