πŸ”Ή Q1: What is an IP address?

A: An IP (Internet Protocol) address is a unique identifier assigned to each device connected to a network. It helps in locating and identifying the device on the internet or local network.

πŸ”Ή Q2: Difference between public and private IP address?

A: - Public IP: Globally unique, accessible over the internet.

  • Private IP: Used within a local network; not routable on the internet (e.g., 192.168.x.x, 10.x.x.x).

πŸ”Ή Q3: What is a port?

A: A port is a logical access channel for communication between two devices. Each service on a device runs on a specific port (e.g., HTTP – port 80, SSH – port 22).

πŸ”Ή Q4: Difference between TCP and UDP?

  • TCP (Transmission Control Protocol): Connection-oriented, reliable, slower (e.g., HTTP, SSH).
  • UDP (User Datagram Protocol): Connectionless, faster, but not reliable (e.g., DNS, streaming).

πŸ”Ή Q5: What is DNS?

A: DNS (Domain Name System) translates human-readable domain names (like google.com) into IP addresses (like 142.250.190.78).

πŸ”Ή Q6: What is a socket?

A: A socket is a combination of an IP address and a port number, used to establish a communication endpoint between two devices.

πŸ”Ή Q7: What is NAT (Network Address Translation)?

A: NAT translates private IP addresses to public IP addresses and vice versa, allowing multiple devices in a private network to access the internet using one public IP.

πŸ”Ή Q8: What is a subnet?

A: A subnet is a segmented piece of a larger network, used to divide and manage networks efficiently. It’s defined by a subnet mask or CIDR notation.

πŸ”Ή Q9: What is CIDR?

A: CIDR (Classless Inter-Domain Routing) is a method for allocating IP addresses and routing. Example: 192.168.1.0/24 means 256 IPs (from .0 to .255).

πŸ”Ή Q10: What is the difference between HTTP and HTTPS?

  • HTTP: Unsecured communication over port 80.
  • HTTPS: Secure version using SSL/TLS encryption, over port 443.

πŸ”Ή Q11: What is a firewall?

A: A firewall is a security system that monitors and controls incoming and outgoing traffic based on predefined rules.

πŸ”Ή Q12: What is the difference between Load Balancer and Reverse Proxy?

  • Load Balancer: Distributes incoming traffic across multiple servers.
  • Reverse Proxy: Forwards client requests to backend servers and returns the response. Nginx can act as both.

πŸ”Ή Q13: Common Networking Commands?

  • ping <host> – Test if host is reachable.
  • traceroute <host> – Show path to host.
  • nslookup <domain> – Check DNS resolution.
  • netstat -tulnp – List active ports.
  • curl <url> – Make web requests.
  • telnet <host> <port> – Test connectivity to port.

πŸ”Ή Q14: What happens when you type a URL in the browser?

  1. DNS lookup to resolve domain name.
  2. TCP handshake between client and server.
  3. HTTP/HTTPS request sent.
  4. Server responds with data.
  5. Browser renders the content.

πŸ”Ή Q15: What is a VPC?

A: VPC (Virtual Private Cloud) is a logically isolated network in the cloud (like AWS) where you can launch resources (EC2, databases) in private or public subnets.

πŸ”Ή Q16: What is the difference between Ingress and Egress traffic?

  • Ingress: Incoming traffic to a system/network.
  • Egress: Outgoing traffic from a system/network.

πŸ”Ή Q17: What is a CDN?

A: CDN (Content Delivery Network) caches and delivers content from servers located close to users, improving load time and availability.

πŸ”Ή Q18: What are some common ports?

  • HTTP – 80
  • HTTPS – 443
  • SSH – 22
  • FTP – 21
  • DNS – 53
  • MySQL – 3306
  • PostgreSQL – 5432
  • Kubernetes API – 6443

πŸ”Ή Q19: What is MTU?

A: MTU (Maximum Transmission Unit) is the largest size of a packet that can be sent in a network layer protocol. Mismatched MTUs can cause packet fragmentation or drops.

πŸ”Ή Q20: How do microservices communicate with each other in Kubernetes?

A: Usually over internal DNS names and cluster IPs. For example, http://service-name.namespace.svc.cluster.local.

πŸ”Ή Q21: What is a MAC address?

A: A MAC (Media Access Control) address is a hardware identifier assigned to a network interface card (NIC) used for communication within the local network.

πŸ”Ή Q22: What is ARP?

A: ARP (Address Resolution Protocol) maps IP addresses to MAC addresses so that devices can communicate within a local network.

πŸ”Ή Q23: What is the difference between Layer 2 and Layer 3?

  • Layer 2 (Data Link Layer): Works with MAC addresses (e.g., switches).
  • Layer 3 (Network Layer): Works with IP addresses (e.g., routers).

πŸ”Ή Q24: What is a routing table?

A: A routing table is a data table stored in a router that lists the paths to particular network destinations.

πŸ”Ή Q25: What is a default gateway?

A: The default gateway is the device (usually a router) that routes traffic from a local network to external networks or the internet.

πŸ”Ή Q26: What is a DHCP server?

A: DHCP (Dynamic Host Configuration Protocol) server dynamically assigns IP addresses and network configuration to client devices.

πŸ”Ή Q27: What is the difference between Static IP and Dynamic IP?

  • Static IP: Manually assigned and fixed.
  • Dynamic IP: Automatically assigned by a DHCP server.

πŸ”Ή Q28: What is port forwarding?

A: Port forwarding maps an external port to an internal IP and port, allowing access to services inside a private network from the internet.

πŸ”Ή Q29: What is a proxy server?

A: A proxy server acts as an intermediary between client and server, used for caching, filtering, logging, and hiding IP addresses.

πŸ”Ή Q30: What is a reverse proxy?

A: A reverse proxy (like Nginx or HAProxy) routes client requests to the appropriate backend server and returns the response to the client.

πŸ”Ή Q31: What is the difference between Load Balancer and Auto Scaling?

  • Load Balancer: Distributes traffic to healthy instances
  • Auto Scaling: Dynamically increases/decreases the number of instances based on traffic/load.

πŸ”Ή Q32: How do containers communicate in Docker?

A: By default, Docker containers in the same bridge network can communicate via container name or IP. You can also use custom networks or expose ports to host.

πŸ”Ή Q33: What is iptables?

A: iptables is a Linux utility used to configure the firewall rules for packet filtering and NAT.

πŸ”Ή Q34: What is a service mesh?

A: A service mesh (e.g., Istio, Linkerd) is a dedicated infrastructure layer to control service-to-service communication in a microservices architecture.

πŸ”Ή Q35: What is a network namespace?

A: Network namespaces provide isolated network stacks (interfaces, routing tables, etc.) for processes β€” used heavily in containers and Kubernetes pods.

πŸ”Ή Q36: What is the difference between SNAT and DNAT?

  • SNAT (Source NAT): Changes source IP (used in outbound traffic).
  • DNAT (Destination NAT): Changes destination IP (used in inbound traffic).

πŸ”Ή Q37: What is a health check in a load balancer?

A: It’s a mechanism to determine if a backend server is healthy and able to serve traffic. Unhealthy servers are removed from the load balancing pool.

πŸ”Ή Q38: What is connection pooling?

A: It reuses network connections instead of opening a new one for every request, reducing overhead and improving performance.

πŸ”Ή Q39: How can you test if a port is open on a remote server?

  • Use telnet <host> <port>
  • Or nc -zv <host> <port>

πŸ”Ή Q40: What is a VPN?

A: A VPN (Virtual Private Network) encrypts your internet connection and routes it through a secure server, used to securely connect remote systems to a private network.

Absolutely! The OSI (Open Systems Interconnection) Model is a foundational networking concept β€” and a must-know for DevOps interviews, especially when asked about protocols, ports, firewalls, load balancers, etc.


πŸ“Ά OSI Model – Explained with Interview Q&A

The OSI model has 7 layers, each with a specific role in data communication.


🌐 OSI Model – Layers (Top to Bottom):

Layer No.Layer NameFunction SummaryExamples
7ApplicationUser interface; network servicesHTTP, HTTPS, FTP, SSH, DNS
6PresentationData formatting, encryption, compressionSSL/TLS, JPEG, MP3
5SessionSession management between appsAPI calls, NetBIOS
4TransportReliable delivery, error handlingTCP, UDP
3NetworkRouting, addressingIP, ICMP, Routers
2Data LinkMAC addressing, frame deliveryEthernet, MAC, Switches
1PhysicalTransmission over physical mediaCables, Hubs, Signals, Bits

πŸ”Ή Q1: What is the OSI model?

A: The OSI model is a conceptual framework that standardizes the functions of a telecommunication or computing system into 7 distinct layers, enabling interoperability between different systems and protocols.


πŸ”Ή Q2: Which layer does IP work on?

A: IP works on the Network Layer (Layer 3).


πŸ”Ή Q3: Which protocols work at the Transport layer?

A: TCP and UDP are the main protocols at the Transport Layer (Layer 4).


πŸ”Ή Q4: What is the role of the Application Layer?

A: It provides services directly to the user or application, like file transfers, emails, or browser data. Examples: HTTP, FTP, DNS.


πŸ”Ή Q5: What is the function of the Presentation Layer?

A: It handles encryption, decryption, data translation, and compression. For example, converting text to ASCII or encrypting via TLS.


πŸ”Ή Q6: What layer does a router operate at?

A: Network Layer (Layer 3).


πŸ”Ή Q7: What layer does a switch operate at?

A: Traditional switches operate at the Data Link Layer (Layer 2). Layer 3 switches can route as well.


πŸ”Ή Q8: What is the difference between TCP and UDP at the OSI level?

  • TCP (Layer 4): Connection-oriented, reliable, ensures data arrives in order.
  • UDP (Layer 4): Connectionless, faster but no guarantee of delivery.

πŸ”Ή Q9: At which layer does SSL/TLS work?

A: Mostly in the Presentation Layer (Layer 6) but often associated with Application Layer in practice (Layer 7).


πŸ”Ή Q10: What is encapsulation in the OSI model?

A: Encapsulation is the process of wrapping data with protocol-specific information at each layer (headers/footers), from Application to Physical.


πŸ“¦ DevOps Relevance of OSI Layers

DevOps Tool/TopicOSI Layer(s) Involved
HTTP/HTTPS, APIsLayer 7 – Application
TLS/SSL (e.g., HTTPS)Layer 6 – Presentation
TCP, UDP Port ConfigsLayer 4 – Transport
IP routing, VPC setupLayer 3 – Network
MAC filtering, VLANsLayer 2 – Data Link
Physical network setupLayer 1 – Physical

βœ… Pro Tip for Interviews:

Always give examples from tools you’ve used, like:

β€œFor example, when I exposed a Docker container, I had to configure the port (Layer 4), IP (Layer 3), and ensure the web app over HTTP was reachable (Layer 7).”