Interview Questions
Interview Questions
======================
What happens when you connect your lan cable to the laptop
TCP retransmit-y does it happen
DHCP message -how do they get transmitted if DHCP server is in a different subnet
In corporate networks .. some websites are blocked and when we use certain proxy servers we
get access- How does this work
Real life examples of IGMP
Who adds the vlan tag -host or switch
Vlan-trunk and router
Vlan access ports and trunk ports
Http web port
In vsphere any one can delete vms how can we stop that
Vswitch concept
MPLS and VPN security
How hosts select source ports
When host doesn’t have IP what ip does it use when sending DHCP messages
What are the ports beyond 1023 called. Below are well known so beyond?
Linux questions
===========
How to find a process and kill it
How to change access permissions for a user
How to find a string in a file
Awk command usage
Grep and piping
How to forcefully kill a process
How to replace contents of a file without using vi editor
Where are log files or events stored in windows and linux
How to check the ram utilisation in linux
How to check utilisation in linux
How to install packages in linux
Vmware questions
==============
1)If there are 10vms in private network and only one has two nics and access to public
network,how will the other 9 vmx communicate to the public network
Ans:Share
You said:
If there are 10vms in private network and only one has two nics and access to public
network,how will the other 9 vms communicate to the public network
ChatGPT said:
ChatGPT
In this scenario, you have 10 VMs in a private network, and only one VM has two network
interfaces (NICs)—one connected to the private network and the other to the public network.
The other 9 VMs can communicate with the public network through network address
translation (NAT) or routing set up on the dual-NIC VM.
Solution Approaches:
Which is Best?
🚧
2)
Ans:1. Firewall Rules (Security Groups, IPTables, Firewalld)
● The firewall on the VM or in the network may be blocking SSH (port 22).
Check using:
bash
CopyEdit
sudo iptables -L -n
sudo firewall-cmd --list-all # (For Firewalld)
●
● Fix:
Allow SSH:
bash
CopyEdit
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT
sudo firewall-cmd --add-service=ssh --permanent
sudo firewall-cmd --reload
○
Check using:
bash
CopyEdit
sudo systemctl status sshd # (Linux)
●
Fix:
bash
CopyEdit
sudo systemctl start sshd
sudo systemctl enable sshd
●
Check using:
bash
CopyEdit
sudo cat /etc/ssh/sshd_config | grep -E "Port|ListenAddress"
●
● Fix:
○
○ If "AllowUsers" is set, ensure your username is allowed.
Check:
bash
CopyEdit
ip route
●
5. SELinux Restrictions 🔒
● SELinux may be enforcing rules that block SSH.
Check using:
bash
CopyEdit
getenforce
●
Fix:
bash
CopyEdit
sudo setenforce 0 # Temporarily disable SELinux
●
Check:
bash
CopyEdit
ls -lah ~/.ssh/
●
● Fix:
○ Ensure the public key is added to ~/.ssh/authorized_keys on the remote
VM.
Next Steps:
1. Run nc -zv <VM-IP> 22 from your local machine to check if the SSH port is open.
2. Check logs using:
bash
CopyEdit
sudo journalctl -xe | grep ssh
3)How does hypervisor now which vm to send data when all vms are downloading the same
thing from internet.
Ans:When 10 VMs on an ESXi host request the same data, the ESXi host handles the network
traffic using its virtual networking stack. Here’s how it determines where to send the data:
● Each VM has a virtual network adapter (vNIC) connected to a virtual switch (vSwitch)
inside the ESXi host.
● The vSwitch behaves like a physical switch, forwarding packets based on MAC
addresses.
● The vSwitch maintains a MAC address table that maps VM MAC addresses to their
corresponding virtual switch ports.
● When data arrives, the vSwitch looks up the destination MAC address and forwards the
packet to the correct VM.
● If multiple VMs request the same data from an external source (e.g., a web server), the
network stack ensures each request is sent out individually unless caching or multicast
optimization is used.
● If the data is multicast-enabled, the ESXi host can use IGMP snooping to optimize
delivery.
● If multiple VMs request the same data from a shared storage system (e.g., NFS,
iSCSI, or vSAN), the storage backend might cache or optimize responses.
● If the data is fetched from an external network, network-layer caching (e.g., a proxy
server or CDN) might reduce duplicate requests.
● Content-Based Read Caching (CBRC): If the data is read from a virtual disk, VMware’s
CBRC can cache frequently accessed blocks in RAM.
● VMkernel Routing: If VMs use different subnets, the ESXi VMkernel routes packets
appropriately.
In short, the ESXi host knows where to send the data based on the destination MAC
addresses stored in the vSwitch and optimizes performance through caching and multicast
handling when applicable.
4)What protocol does a switch use to detect when a host is connected to it.
A switch detects when a host is connected using several key protocols and mechanisms,
including:
● When a new host connects and tries to communicate on the network, it sends an ARP
request to find the MAC address of another device.
● The switch learns the MAC address of the new host when it sees the ARP response
and updates its MAC address table.
● If STP is enabled, the switch may detect the new connection by sending BPDU (Bridge
Protocol Data Unit) packets.
● Helps prevent network loops and ensures a stable topology.
● LLDP (vendor-neutral) and CDP (Cisco-specific) are discovery protocols that allow the
switch to identify directly connected devices.
● Periodically sends LLDP or CDP packets to detect and gather information about
connected hosts.
4. DHCP Requests
● The switch learns about a host when it receives any Ethernet frame from the host.
● The switch records the source MAC address in its MAC address table and associates
it with the port.
● When a device is plugged in, the switch and the host exchange Auto-Negotiation
signals to determine:
○ Speed (e.g., 10/100/1000 Mbps)
○ Duplex mode (Full/Half)
Summary
5)H1---->SW1--->R1-->sw2-->H2
|
SW3
|
H2
Initially H2 is connected to SW2 and ping works. Now is H2 is removed from SW2 and
🚀
connected to SW3, how does the path get updated.
Ans:Gratuitous ARP (GARP) Explained
A Gratuitous ARP (GARP) is a special unsolicited ARP request or reply that a device sends
to inform the network of its MAC-IP binding.
✅ Updates ARP tables quickly – Notifies switches and routers of a new MAC address
✅ Prevents duplicate IP conflicts – Helps detect if another device is using the same IP.
location.
✅ Ensures high availability (VRRP/HSRP) – Used in failover scenarios to update the active
✅ Optimizes network convergence – Useful when moving a host to a new switch.
gateway’s MAC.
ruby
CopyEdit
Sender MAC: AA:BB:CC:DD:EE:FF
Sender IP: 192.168.1.10
Target MAC: FF:FF:FF:FF:FF:FF (Broadcast)
Target IP: 192.168.1.10 (Same as sender IP)
1️⃣ Host Moves (Switch Migration) – Updates the new switch’s MAC table.
2️⃣ Failover (VRRP, HSRP, FHRP) – Virtual IP moves between redundant gateways.
3️⃣ IP Conflict Detection – Alerts if two hosts claim the same IP.
4️⃣ Load Balancers – Tells network devices that the VIP (Virtual IP) is on a new machine.
● Switches maintain a MAC address table (CAM table) that maps MAC addresses to
specific ports.
● When the host was initially connected, Switch 1 learned its MAC address and
associated it with Port X.
● After moving the host to Switch 2, Switch 1 stops receiving frames from the host.
● Switch 1 does not immediately remove the MAC address but waits for the aging
timer to expire (default ~300 seconds).
● Meanwhile, Switch 2 learns the new port for the MAC address when the host sends
any traffic.
● When the host connects to Switch 2 and sends any traffic (like an ARP request, DHCP
request, or even a simple ping):
○ Switch 2 receives the frame and learns the host's MAC address.
○ The MAC address is now associated with the new port on Switch 2.
○ Switch 2 updates its MAC address table.
3. Traffic Forwarding (Flush and Update)
● If the host’s IP address remains the same, devices that previously communicated with
it still have the old MAC entry in their ARP cache.
● The sender may send traffic to the wrong switch until:
○ The ARP entry times out (~5 min on most systems).
○ The host sends an unsolicited ARP or a new ARP request to refresh caches.
● If both switches are connected via a trunk link, Spanning Tree Protocol (STP)
ensures there are no loops.
● The new switch can forward traffic correctly without causing a broadcast storm.
Summary:
This process typically takes a few seconds, but optimizations like ARP gratuitous updates or
Rapid STP (RSTP) can speed it up.
6)H1-->sw1---------sw2--->h2
Sw1---------sw2
Does loop happen and if yes how to avoid it. And retain bandwidth
7) how does load sharing happen in lacp
The TCP 3-way handshake is used to establish a reliable connection between a client and a
server. It consists of:
The third ACK in the handshake (sent by the client) serves two critical purposes:
● The SYN-ACK is sent by the server to acknowledge the client’s initial SYN request and
also includes its own SYN to establish a bidirectional connection.
● The client sends an ACK to confirm that it received the SYN-ACK successfully.
● Without this, the server wouldn’t know whether the client actually received its response.
● TCP is full-duplex, meaning both sides must establish their ability to send and receive
data.
● The first two messages (SYN → SYN-ACK) ensure that both parties agree on the
connection.
● The third message (ACK) guarantees that both parties are now ready to communicate.
What If the Third ACK Was Missing?
If the client doesn’t send the final ACK, the server will keep waiting, assuming the handshake
🔸
isn’t complete.
🔸
Eventually, the server will timeout and retransmit the SYN-ACK.
If too many retries fail, the connection attempt is dropped.
Analogy:
📞
Imagine a phone call:
📞
Caller: “Hello, can we talk?” (SYN)
📞 ✅
Receiver: “Yes, I can hear you. Can you hear me?” (SYN-ACK)
Caller: “Yes, I can hear you too!” (ACK)
Without the third confirmation, the receiver isn’t sure if the caller can hear them.
Conclusion
The third ACK ensures a reliable, bidirectional connection where both parties can send and
receive data. It finalizes the handshake so that data transmission can begin.
You said:
yes
ChatGPT said:
ChatGPT
3.
4. Click Start Capture and initiate a connection (e.g., open a webpage or SSH session).
CopyEdit
tcp.flags.syn==1 or tcp.flags.ack==1
go
CopyEdit
tcp.flags.syn==1 || tcp.flags.ack==1 && tcp.len==0
bash
CopyEdit
telnet 192.168.1.1 80 # Connect to a web server (port 80)
📌 On Windows (CMD):
powershell
CopyEdit
Test-NetConnection -ComputerName 192.168.1.1 -Port 80
📌 On both (force new TCP connection):
bash
CopyEdit
curl -v http://192.168.1.1
Conclusion
The third ACK ensures a reliable, bidirectional connection before data transfer begins.
Wireshark helps visualize the handshake, making it easier to debug network issues!
🏢🌍
How Does a DHCP Server Assign IP Addresses to Hosts in Different
Subnets?
A DHCP (Dynamic Host Configuration Protocol) server can serve multiple subnets by
determining which subnet a DHCP request originates from. Here’s how it works:
If the DHCP server is not in the same subnet as the client, a DHCP relay agent (IP Helper
Address) helps forward requests.
🔹 How It Works:
1. The client broadcasts a DHCP Discover (255.255.255.255), but it doesn’t cross
routers.
2. The router (or switch with DHCP relay) intercepts the request.
3. The router forwards the request to the central DHCP server with the "GIADDR"
(Gateway IP Address) field set.
4. The DHCP server uses GIADDR to determine the correct subnet and assigns an IP
from the appropriate pool.
5. The server sends the DHCP Offer back to the relay agent.
6. The relay agent forwards it to the client.
📌 Example:
● Client Subnet: 192.168.2.0/24
● Router (Relay Agent IP): 192.168.2.1
● DHCP Server (Centralized): 192.168.1.100
● When the DHCP server sees GIADDR = 192.168.2.1, it knows to assign an IP from
192.168.2.0/24.
In enterprise networks with VLANs, each VLAN is assigned a separate subnet and DHCP
pool.
🔹 Example Setup:
● VLAN 10 (Users) → 192.168.10.0/24 → Pool:
192.168.10.100-192.168.10.200
● VLAN 20 (Guests) → 192.168.20.0/24 → Pool:
192.168.20.100-192.168.20.200
● VLAN 30 (VoIP Phones) → 192.168.30.0/24 → Pool:
192.168.30.100-192.168.30.200
When a client in VLAN 20 requests an IP, the GIADDR (Gateway IP) in the request tells the
DHCP server to assign an IP from the VLAN 20 pool.
A DHCP server must be configured with separate pools for each subnet. Example for a
Linux-based ISC DHCP Server:
➡ When a request comes in with GIADDR = 192.168.20.1, the server assigns an IP from the
192.168.20.0/24 pool.
🚀 Summary
✅ Direct Subnet: DHCP server directly assigns an IP.
✅ Relay Agent (GIADDR): Helps DHCP servers identify the correct subnet.
✅ VLANs & IP Helper: Used in large networks to map requests to the right pool.
✅ Configured Pools: DHCP server maintains multiple subnet IP pools.
Would you like a packet capture example with Wireshark? 😊
4o
You said:
yes
ChatGPT said:
ChatGPT
3.
3️⃣ 0.002 DHCP Server Relay Agent DHCP DHCP Offer (Take
s (192.168.1.10 (192.168.20.1) 192.168.20.101!)
0)
6️⃣ 0.005 Relay Agent DHCP Server DHCP DHCP Request (Relayed)
s (192.168.20.1) (192.168.1.100)
7️⃣ 0.006 DHCP Server Relay Agent DHCP DHCP ACK (Confirmed,
s (192.168.1.10 (192.168.20.1) use 192.168.20.101)
0)
11) how does a dhcp server assign ip to a host which is in a different vlan than itself
12)what are access and trunk links
13) does the vlan tag come on both access and trunk links or only one.
14)if tcp if a portion of the data is missing, will it retransmit the entire thing again or only the
missing part
15) what is selective retransmission in tcp
16) dhcp port numbers..which is client and which is server
17) multicast there are three versions what is the difference and what is multicast
18) what is PIM
19) If there are any tweaks we can make to keep a non-responding legacy hosts in the group
membership
s
18. What is equivalence partitioning and boundary value analysis? Y they are needed?
19. What is the testing methodology followed in ur project?
20. Why is vlan translation required? What does it do?
21. What is the maximum no. of users FTTU system can support?
22. What is the maximum bandwidth per user?
23. Where is the OLT located in the actual n/w.
24. INVITE client transaction state machine diagram? What are the timers involved in this?
25. Stateless proxy and stateful proxy.
26. what is the value of max-forwards
27. main headers in sip . Why via header is needed?
28. What is the use of DHCP relay agent? The DHCP msgs sent by relay agent or broadcast or
unicast?
29. 3 switches are interconnected. lacp and stp is enabled. how does it work?
30. what is natting? diff types of natting and how it works.
31. what is the diff betn rip v1 and v2?
32. host->s/w->router->IGMp server---> how does igmp work in this scenario?
33. if default gateway is not configured, is it possible to route a packet to different n/w?
34. what is proxy arp?
35. wht is edge router?
36. will router understand vlan?
37. in ppoe, after pADI, pADO, PADR, PADS....which pkt flows next?
38. wht does lcp pkt contain?
39. auntentication takes place in which phase of pppoe?
40. IGMP host-> router-> router-> igmp server? HOw does igmp work here>?
41. What is rarp?
42. why does ospf doesn't require loop avoidance?
43. practical implementation of urgent pointer in tcp?
44. practical implementation of reset pointer in tcp?
45. If host A can ping host b, but host b cannot ping host A, wht will be the issue? ( the back
path may not be updated in the routing table)
46. wht are the features of ipv6? why we need ipv6?
47. wht will happen if a link fails in a switch enabled with stp?
48. wht is virtual link?
49. wht do u mean by half-close in tcp connection?
50. suppose a pkt is getting fragmented, where will the re-assembly happen?
51. arp request is encapsulated in a ethernet frame, then what will be the destn mac then?
52. Are there any keep alive msgs in pppoe?
-> Difference betn DHCP and dns? How are they interrelated.
SIP
====
53. y ACK msg is needed in sip? wht if ACK msg is not sent?
54. why is the request line and to address field same in an invite request msg? Y the same thing
is given in two places?
55. Why ACK msg is treated as a separate tarnsaction in basic call flow?
56. strict routing and loose routing?
57. Use of ACK to INVITE
59. Call timesout after 200 OK, what would be the response? --> The transaction will be
cancelled
60. There are differences between B2BUA and Proxy Servers! Find it out
61. How is call handled when media supported by both parties are different?
415 Unsupported Media Type
24. INVITE client transaction state machine diagram? What are the timers involved in this?
17.1.1 INVITE Client Transaction
default is 64*T1. However, the client transaction does not know the
value of T1 in use by the server transaction, so an absolute minimum
of 32s is used instead of basing Timer D on T1.
|INVITE from TU
Timer A fires |INVITE sent
Reset A, V Timer B fires
INVITE sent +-----------+ or Transport Err.
+---------| |---------------+inform TU
| | Calling | |
+-------->| |-------------->|
+-----------+ 2xx |
| | 2xx to TU |
| |1xx |
300-699 +---------------+ |1xx to TU |
ACK sent | | |
resp. to TU | 1xx V |
| 1xx to TU -----------+ |
| +---------| | |
| | |Proceeding |-------------->|
| +-------->| | 2xx |
| +-----------+ 2xx to TU |
| 300-699 | |
| ACK sent, | |
| resp. to TU| |
| | | NOTE:
| 300-699 V |
| ACK sent +-----------+Transport Err. | transitions
| +---------| |Inform TU | labeled with
| | | Completed |-------------->| the event
| +-------->| | | over the action
| +-----------+ | to take
| ^ | |
| | | Timer D fires |
+--------------+ | - |
| |
V |
+-----------+ |
| | |
| Terminated|<--------------+
| |
+-----------+
Figure 5: INVITE client transaction
core or a UAC core. A UAC core will handle generation of the ACK for
this response, while a proxy core will always forward the 200 (OK)
upstream. The differing treatment of 200 (OK) between proxy and UAC
is the reason that handling of it does not take place in the
transaction layer.
Unix
====
-> does ls- lrt list all the files?
-> if v need to access the last 10 files in a directory which has over 1 lakh files...wht is the
command
-> what is command to assign ip address to a linux m/c
-> if ifconfig command gets command not found as a response, wht is the reason or wht other
command can v use to assign ip address?
ded down.
->25. diff betn grep and find.
26. wht is the command to know the OS in unix? uname
27. how do u change file permissions in unix?
28. without using the number, is there any other way and what is tht way to change
permissions?
29. if u have 10 instances
-> Difference betn df and du
-> top gives utilization of wht? hard disk memory or ram?
-> how to see how much hard disk space has been used?
Testing concepts
===============
-> Why performance testing is needed? What can be found out by just doing performance
testing alone but cannot be found out by doing funtional testing? ---ans: capacity of the system
--> is load, robustness etc are subset of performance testing?
-> wht is tracebility matrix? can a requirement have no test cases mapped in a tracebility
matrix?
-> can a single test case be mapped to two different requirements?
-> wht are the contents in a test case?
-> If some out of box testing is done, how is it tracked? Can this be included in the tracebility
matrix? if its included , wht will u include this under
->
-> wht are the different documents needed for test design
-> wht is the diff betn test plan and test strategy
-> wht process do u follow in ur project
->