Most Important Networking Interview Questions for DevOps & Cloud Roles
🔹 Linux Networking – Basic to Advanced Questions
✅ Basic Level
1.What is the difference between IP address, Subnet mask, and Gateway?
2.How do you check your system’s IP address in Linux? (commands)
3.Difference between ifconfig and ip addr command.
4.How do you check active network connections in Linux?
5.What is the difference between TCP and UDP? Give examples.
6.How to test connectivity between two systems? (ping, telnet, nc).
7.What is the use of /etc/hosts file in Linux?
8.What is the difference between public IP and private IP?
9.How do you check open ports on a Linux system?
✅ Intermediate Level
10.What is the difference between switch, router, and bridge in networking?
11.What is DNS? How do you check DNS resolution in Linux?
12.Explain the difference between static IP and DHCP.
13.What is ARP? How to check ARP table in Linux?
14.What is the use of /etc/resolv.conf file?
15.How do you trace the path packets take to a destination?
16.What is netstat command? Why is it replaced with ss command?
17.What is the role of nmcli and nmtui in Linux networking?
18.How do you restart networking service in Linux?
19.How to assign a temporary and a permanent IP address in Linux?
✅ Advanced Level
20.What is the difference between NAT and PAT?
21.What are firewall rules? Difference between iptables and firewalld.
22.How to allow only specific IPs to access a service in Linux?
23.How does a packet travel from one system to another in OSI layers?
24.What is the difference between IPv4 and IPv6?
25.What is MTU (Maximum Transmission Unit)? How to check and change it?
26.What is VLAN and how is it configured in Linux?
27.What is bonding/teaming in Linux networking?
28.What are bridges in Linux networking? How to configure one?
29.How do you troubleshoot if a server has no internet access but LAN works?
🔹 Tricky Networking Questions (Linux/DevOps Interviews)
30.If your Linux server is unable to access the internet, how will you troubleshoot step by step?
👉 Trick: Interviewer expects → check IP, ping gateway, check DNS, check routing table, firewall.
31.What is the difference between a MAC address and an IP address? Can two systems have the same MAC?
👉 (IP can change, MAC is unique → but in virtualization/cloning, same MAC possible).
32.What happens when you type google.com in your browser? Explain step by step.
👉 Trick: DNS resolution → ARP → TCP handshake → HTTP request → Response.
33.How do you check which process is using a specific port?
👉 lsof -i :80 or ss -tulnp | grep 80.
34.If you can ping an IP but not the domain name, what is the issue?
👉 Trick: DNS resolution issue.
35.What is the difference between netstat and ss commands? Why is netstat deprecated?
👉 ss is faster, works with newer kernels, netstat is old.
36.What is the difference between hub, switch, and router? In which OSI layer do they work?
👉 Hub → Layer 1, Switch → Layer 2, Router → Layer 3.
37.If your server has 2 NIC cards connected to 2 different networks, how does Linux decide which one to use?
👉 Trick: Based on routing table (longest prefix match).
38.What is MTU? What happens if packets are larger than MTU?
👉 They get fragmented (unless DF bit set → then packet dropped).
39.How will you allow only one IP to access your server on port 22?
👉 Using iptables/firewalld rule → iptables -A INPUT -p tcp -s <IP> --dport 22 -j ACCEPT.
40.What’s the difference between telnet, ping, and nc for testing connectivity?
👉 ping = ICMP only, telnet = TCP only, nc = TCP + UDP both.
41.What is the difference between SNAT and DNAT?
👉 SNAT = Change source IP (outbound), DNAT = Change destination IP (inbound).
42.Can two systems have the same IP in the same network? What happens then?
👉 IP conflict → unpredictable behavior, ARP table confusion.
43.What is ARP spoofing?
👉 When attacker sends fake ARP responses → redirect traffic.
44.What is the difference between stateful and stateless firewall rules?
👉 Stateful tracks connections (iptables by default), stateless does not.
45.What is the difference between curl and wget?
👉 curl = transfer data (API testing), wget = download files.
46.What happens if default gateway is not configured in Linux?
👉 You can access local subnet, but not outside network (internet).
47.What is 127.0.0.1 and why is it used?
👉 Loopback address for testing local machine.
48.What is the difference between /etc/hosts and DNS server resolution? Which one takes priority?
👉 /etc/hosts has priority over DNS queries.
49.If a server has multiple IPs on the same NIC, how can you configure it in Linux?
👉 By creating secondary interface configs (eth0:1 etc.) or using ip addr add.
🔹 Some Practical Commands for Networking
ip addr show → Show IP details
ip route show → Show routing table
ping <host> → Connectivity test
traceroute <host> → Show packet path
dig <domain> / nslookup <domain> → DNS check
netstat -tulnp / ss -tulnp → Show listening ports
iptables -L -n / firewall-cmd --list-all → Firewall rules
nmcli / nmtui → Network manager
Thank You😊😉
Comments
Post a Comment