Networking: DNS, TCP/IP, Load Balancers and VPNs Interview Questions
261 multiple-choice tech interview questions on Networking: DNS, TCP/IP, Load Balancers and VPNs: OSI and TCP/IP layers, TCP vs UDP, IP addressing and CIDR, DNS records, HTTP and TLS, load balancing, VPNs and private connectivity. Written for technical phone screens and interview prep, organized by subtopic, with a short explanation for every answer. Learn the 241 key terms with the flashcards first, then test yourself.
Take the practice test · Flashcards · All study tools
What it covers
- 10.1 Layers, transport protocols and ports
- 10.2 IP addressing, subnetting and IPv6
- 10.3 Routing, switching and NAT
- 10.4 DNS in depth
- 10.5 Encryption in transit, VPNs and tunnels
- 10.6 Load balancing and proxies
- 10.7 Cloud virtual networks and hybrid connectivity
- 10.8 Network security: firewalls, segmentation and DDoS
- 10.9 Performance and troubleshooting
Key terms
10.1 Layers, transport protocols and ports
- TCP
- Connection-oriented transport protocol with reliable, ordered delivery
- UDP
- Connectionless transport protocol with low overhead and no delivery guarantees
- OSI model
- Seven-layer reference model for network functions
- Encapsulation
- Wrapping data in each layer's header on the way down the stack
- Data link layer
- OSI layer 2, which moves frames between devices on one link
- TCP/IP model
- The four-layer model the internet actually uses
- FIN vs RST
- Graceful TCP close versus an immediate abort
- Sequence number
- A TCP field counting bytes sent, for order and retransmission
- Receive window
- The amount of data a receiver can buffer, advertised to the sender
- Slow start
- TCP's quick ramp-up of its congestion window from a small start
- BBR
- A congestion control algorithm that estimates bandwidth and round-trip time
- UDP use cases
- Real-time media, games, DNS and other loss-tolerant traffic
- Ephemeral port
- A short-lived source port chosen by the client OS
- Port 53
- The standard DNS port, for UDP and TCP
- Port 3389
- The default port for Remote Desktop Protocol
- 5-tuple
- Protocol plus source and destination IPs and ports
- Retransmission timeout
- How long TCP waits for an ACK before resending
- Window scaling
- A TCP option that multiplies the advertised window
- Fast retransmit
- Resending a segment after three duplicate ACKs
- ECN
- Marking packets to signal congestion without loss
- Network byte order
- Big-endian ordering used for protocol header fields
- TLS placement
- TLS runs over TCP and under app protocols like HTTP
- MAC address
- A 48-bit hardware address used on a local link
- UDP limits
- UDP gives no ordering, retries or congestion control
- IP TTL
- A hop counter that routers decrement; traceroute relies on it
- Port 5432
- The default PostgreSQL port
10.2 IP addressing, subnetting and IPv6
- CIDR
- Notation for IP ranges, such as 10.0.0.0/16
- NAT
- Translating private addresses to a public address
- Subnet mask
- Bits marking the network part of an address
- Usable hosts
- Total addresses minus network and broadcast
- Broadcast address
- The last address of a subnet, with all host bits set
- /28
- A 16-address IPv4 block
- Subnetting
- Dividing a block into smaller ones by borrowing host bits
- Route summarization
- Combining adjacent prefixes into one shorter prefix
- Loopback
- Addresses that refer to the local machine
- Link-local IPv4
- 169.254.0.0/16, valid only on the local link
- CGNAT range
- 100.64.0.0/10, shared address space for carrier NAT
- 0.0.0.0/0
- Every IPv4 address; the default route in route tables
- Documentation ranges
- Address blocks reserved for examples
- IPv6 shorthand
- Dropping leading zeros and collapsing one zero run with ::
- /64 subnet
- The standard IPv6 subnet size
- IPv6 link-local
- fe80::/10 addresses valid only on one link
- Unique local address
- fc00::/7, private IPv6 not routed on the internet
- Neighbor Discovery
- IPv6's protocol for finding neighbors and routers
- Dual-stack
- Running IPv4 and IPv6 at the same time
- NAT64/DNS64
- Translation letting IPv6-only hosts reach IPv4
- Address planning
- Choosing ranges that won't overlap with users or partners
- /32
- A single IPv4 address as a prefix
- /31 link
- A two-address subnet for point-to-point links
- Subnet count
- 2 to the power of borrowed bits
- Privacy extensions
- Rotating temporary IPv6 addresses for outbound traffic
- ipaddress module
- Python's standard library for IPs and networks
- IPv4 multicast
- 224.0.0.0/4, addresses for one-to-many delivery
10.3 Routing, switching and NAT
- ARP
- Address Resolution Protocol, mapping IPv4 addresses to MAC addresses
- Gratuitous ARP
- An unsolicited ARP announcing an IP-to-MAC mapping
- VLAN
- A virtual LAN separating broadcast domains on shared switches
- Trunk port
- A switch port carrying several VLANs with tags
- MAC table
- A switch's map of MAC addresses to ports
- Spanning Tree Protocol
- A protocol that blocks redundant links to prevent loops
- Longest prefix match
- Picking the route with the most specific matching prefix
- Static route
- A route set by hand rather than learned
- OSPF
- An interior link-state routing protocol
- BGP
- Border Gateway Protocol, the internet's routing protocol between networks
- ASN
- A number identifying an autonomous system in BGP
- RPKI
- Signed records of which AS may originate a prefix
- ECMP
- Equal-cost multipath routing across several next hops
- DNAT
- Rewriting a packet's destination address or port
- PAT
- NAT that maps many private hosts to one IP using ports
- NAT traversal
- Techniques like STUN, TURN and ICE to connect peers behind NAT
- Hairpin NAT
- NAT loopback, letting inside hosts use a public IP to reach inside servers
- DORA
- The DHCP exchange: Discover, Offer, Request, Acknowledge
- Layer 3 switch
- A switch that can also route between subnets
- Broadcast domain
- The set of hosts that receive each other's broadcasts
- Asymmetric routing
- Requests and replies taking different paths
- First-hop redundancy
- VRRP or HSRP sharing a virtual gateway IP between routers
- Delivery modes
- Unicast, broadcast, multicast and anycast
- SNAT port exhaustion
- Running out of NAT source ports for one destination
- AS path prepending
- Repeating your ASN in announcements to steer inbound traffic
10.4 DNS in depth
- A record
- DNS record mapping a name to an IPv4 address
- CNAME
- DNS record aliasing one name to another
- TTL (DNS)
- How long resolvers may cache a DNS answer
- TLS
- Protocol providing encryption and authentication for HTTPS
- AAAA record
- A DNS record mapping a name to an IPv6 address
- MX record
- A DNS record naming a domain's mail servers with preferences
- TXT record
- A DNS record holding free-form text
- Delegation
- Handing a subdomain to other name servers via NS records
- SOA record
- Start of Authority: core settings for a zone
- PTR record
- A pointer record used for reverse lookups
- SRV record
- A DNS record giving a service's host, port, priority and weight
- Lame delegation
- NS records naming servers that aren't authoritative for the zone
- Recursive resolver
- A server that queries others on a client's behalf and caches results
- Glue record
- An A or AAAA record in the parent for in-zone name servers
- Negative caching
- Resolvers caching "no such name" answers for a while
- TTL lowering
- Shortening record TTLs before a planned change
- DNSSEC
- Signatures that let resolvers verify DNS data
- Encrypted DNS
- DoH and DoT, which encrypt DNS queries
- Cache poisoning
- Tricking a resolver into caching a forged answer
- Wildcard record
- A DNS record matching names that don't exist otherwise
- Zone transfer
- Copying a full zone from a primary to secondaries
- GeoDNS
- DNS answers chosen by the client's location
- DNS failover
- Changing DNS answers when a health check fails
- Subdomain takeover
- Hijacking a subdomain whose record points to an unclaimed resource
- Registrar
- The company where a domain is registered
- EDNS Client Subnet
- A DNS extension passing a client's subnet upstream
- Multi-provider DNS
- Serving one zone from two DNS providers
- Root servers
- The 13 named DNS roots, served from many anycast sites
10.5 Encryption in transit, VPNs and tunnels
- IPsec
- A suite that secures IP packets, using IKE for keys and ESP for encryption
- Tunnel mode
- IPsec mode that encapsulates the entire original packet
- IKE proposal
- The set of crypto settings each IPsec peer offers
- WireGuard
- A lean, modern VPN protocol using public keys over UDP
- AllowedIPs
- WireGuard's per-peer routing and source filter
- SSL VPN
- A VPN built on TLS rather than IPsec
- Split tunneling
- Routing only some traffic through the VPN
- GRE
- Generic Routing Encapsulation, a simple tunnel protocol
- VXLAN
- Layer 2 frames carried in UDP over an IP network
- Overlay network
- A virtual network built on top of a physical one
- Geneve
- An extensible encapsulation protocol for overlays
- MPLS
- Label switching used in carrier and enterprise WANs
- SD-WAN
- Software-defined control of WAN links and routing
- MACsec
- IEEE 802.1AE layer 2 encryption
- Forward secrecy
- Session keys that stay safe even if a long-term key leaks
- Mesh VPN
- Peer-to-peer encrypted links among many devices
- MSS clamping
- Rewriting TCP MSS so packets fit a tunnel's smaller MTU
- Dead peer detection
- IKE checks that the remote peer is still alive
- Route-based VPN
- A VPN using a tunnel interface chosen by routing
- BGP over VPN
- Dynamic routing across tunnels for failover
- NAT-T
- Wrapping IPsec ESP in UDP 4500 to pass through NAT
- IPsec authentication
- Using pre-shared keys or certificates to identify peers
- Private root trust
- Clients must be given a private CA's root to trust its certificates
- ACME automation
- Protocol and tools that renew certificates automatically
- IPsec ports
- UDP 500 for IKE, UDP 4500 for NAT-T and IP protocol 50 for ESP
10.6 Load balancing and proxies
- Layer 7 load balancer
- Balances traffic using application data such as HTTP paths
- Site-to-site VPN
- Encrypted tunnel connecting two networks over the internet
- Weighted round robin
- Rotating requests in proportion to set weights
- Source IP hash
- Choosing a backend by hashing the client's IP
- Uneven request cost
- Requests of very different cost that make equal counts unfair
- Passive health check
- Ejecting backends based on errors in live traffic
- Connection imbalance
- Long-lived connections pinning load to older backends
- Slow start (LB)
- Gradually increasing traffic to a new backend
- Max connections
- A cap on concurrent connections a proxy opens to each backend
- GSLB
- Steering users among data centers or regions
- Health check sources
- The IP ranges load balancers probe from
- Direct server return
- Responses skip the load balancer on the way back
- Tiered load balancing
- An L4 layer distributing traffic to an L7 proxy fleet
- Active-passive
- One node serving while a standby waits for failover
- DNS round robin
- Returning several IPs in rotating order
- Idle timeout
- How long a proxy keeps a quiet connection open
- Zone-aware routing
- Preferring same-zone backends while healthy
- HAProxy balance
- The directive that sets HAProxy's balancing algorithm
- max_fails
- NGINX's passive failure threshold for an upstream server
- Shallow health check
- A check of the instance itself, not every downstream system
- Health check thresholds
- Consecutive passes or fails needed to change status
- UDP load balancing
- Spreading UDP flows with a layer 4 balancer
- Virtual IP
- A front-end address shared by a service, not a host
- L4 vs L7 choice
- Speed and protocol range versus HTTP-aware features
- Modulo hashing
- Picking a server by hash mod count, which reshuffles on changes
10.7 Cloud virtual networks and hybrid connectivity
- Regional hubs
- One transit hub per region rather than a single global hub
- Hub and spoke
- Spokes connecting through a central transit hub
- Return routes
- Routes the far side needs to send replies back
- Private endpoint
- A private IP in your network for a managed service
- Prefix limits
- Caps on BGP routes a provider will accept
- Centralized egress
- Routing outbound traffic through shared inspection
- Dedicated interconnect
- A private physical link between on-prem and a cloud
- Link diversity
- Redundant links in separate facilities and devices
- Link encryption
- MACsec or IPsec protecting private interconnects
- Overlapping ranges
- Two networks using the same IPs
- IPAM
- Planning, allocating and auditing IP ranges
- Cloud exchange
- A colocation fabric linking several clouds and sites
- Environment isolation
- Separate networks for prod, test and dev
- Shared services
- Common infrastructure reachable by all spokes
- SR-IOV
- Hardware sharing that lets VMs reach the NIC directly
- Zone vs region latency
- Low single-digit ms between zones; more across regions
- Egress-only gateway
- A gateway allowing outbound IPv6 while blocking inbound starts
- SASE
- Secure Access Service Edge, cloud-delivered networking and security
- Path preference
- Steering traffic with BGP attributes
- BFD
- Bidirectional Forwarding Detection, fast link failure checks
- LACP
- A protocol to bundle physical links into one
- Data locality
- Keeping chatty components in the same region or zone
- SaaS private connectivity
- Reaching SaaS over private endpoints
- Private inter-VPC traffic
- Peering or hubs instead of public paths between networks
- Provisioning lead time
- Weeks needed for physical circuits and cross-connects
- Cloud unicast
- Cloud networks generally forward only unicast traffic
- Cloud IP failover
- Moving IPs with provider APIs instead of ARP tricks
- Multiple tunnels
- Several VPN tunnels combined for bandwidth and resilience
10.8 Network security: firewalls, segmentation and DDoS
- Stateful firewall
- A firewall that tracks connection state
- Stateless ACL
- Packet filters with no connection memory
- Default deny
- Blocking all traffic unless explicitly allowed
- Rule order
- Ordered firewalls applying the first matching rule
- Egress filtering
- Limiting where internal hosts can connect out
- DMZ
- A buffer network for internet-facing services
- Microsegmentation
- Fine-grained rules between individual workloads
- Scope reduction
- Isolating regulated systems to limit compliance scope
- IPS
- Intrusion prevention, blocking threats inline
- Anomaly detection
- Spotting unusual behavior against a baseline
- NGFW
- A firewall with app, user and threat awareness
- TLS inspection
- Decrypting and re-encrypting traffic to scan it
- SYN cookies
- Stateless handling of half-open TCP connections
- Amplification attack
- Spoofed requests that make servers send large replies to a victim
- Protocol attack
- DDoS exhausting connection state in network devices
- Scrubbing center
- A facility that filters attack traffic before it reaches you
- ARP spoofing
- Sending forged ARP replies to redirect local traffic
- 802.1X
- Port-based network access control
- MAC flooding
- Overflowing a switch's MAC table to sniff traffic
- VLAN hopping
- Reaching another VLAN by abusing tagging or trunking
- SYN scan
- Half-open scanning to find listening ports
- Honeypot
- A decoy system meant to attract attackers
- Exposed admin ports
- Management ports reachable from the whole internet
- Rule review
- Auditing firewall rules for need and scope
- WPA3
- The latest Wi-Fi security protocol
- DNS sinkhole
- Answering bad-domain lookups with a safe address
- FQDN filtering
- Allowing egress by domain name rather than IP
- Beaconing
- Periodic callbacks from malware to its controller
- Fail-closed
- Blocking traffic when a security control fails
10.9 Performance and troubleshooting
- Bandwidth-delay product
- Bandwidth times RTT: data needed in flight to fill a link
- Window-limited throughput
- Maximum rate equals window size divided by RTT
- Loss and RTT
- TCP throughput dropping with both loss and round-trip time
- Jitter
- Variation in packet arrival delay
- Bufferbloat
- Excess queuing in network buffers that inflates latency under load
- MTU
- Maximum transmission unit, the largest packet a link carries
- PMTUD black hole
- Large packets dropped silently because ICMP feedback is blocked
- Fragmentation
- Splitting packets that exceed a link's MTU
- Wi-Fi latency
- Variable delay from contention, interference and retransmits
- Goodput
- Useful application data delivered per second
- Silent hop
- A router that forwards traffic but doesn't reply to probes
- Layered troubleshooting
- Checking connectivity layer by layer
- Name vs IP test
- Separating DNS problems from connectivity problems
- Refused vs timeout
- An RST from a closed port versus no answer at all
- Zero window
- A receiver saying its buffer is full
- iperf3
- A tool for measuring network throughput between hosts
- Parallel streams
- Splitting a transfer across connections to fill a path
- Microburst
- A very short traffic spike that overflows queues
- Streaming telemetry
- Devices pushing metrics continuously
- NetFlow/IPFIX
- Flow records exported by network devices
- CRC errors
- Corrupted frames detected by checksum
- DSCP
- Packet markings for quality of service classes
- Shaping vs policing
- Buffering versus dropping traffic over a rate
- Chatty protocols
- Many sequential round trips multiplying latency
- Two-sided capture
- Capturing at client and server to locate a fault
- Protocol overhead
- Bytes spent on headers and framing
- Queueing delay
- Waiting time in buffers that grows with utilization
- Elephant flows
- Large long-lived flows that skew per-flow load sharing
Sample practice questions
What is the main difference between TCP and UDP?
- UDP is connection-based, reliable and ordered; TCP is connectionless and lighter
- TCP is only used for streaming video, while UDP is only used for web pages
- TCP runs at OSI layer 3 and UDP at layer 4, so they never share traffic
- TCP is connection-based, reliable and ordered; UDP is connectionless and lighter
Answer: D. TCP is connection-based, reliable and ordered; UDP is connectionless and lighter Both are layer 4 transport protocols. DNS queries, VoIP and games often use UDP.
How many IP addresses are in the CIDR block 10.0.0.0/24?
- 256
- 24
- 65,536
- 1,024
Answer: A. 256 A /24 leaves 8 host bits: 2⁸ = 256. Azure reserves 5 addresses per subnet and AWS reserves 5 too.
What does NAT (network address translation) do?
- Translates domain names into IP addresses
- Encrypts packets sent between two sites
- Rewrites private addresses to a shared public IP
- Assigns MAC addresses to network devices
Answer: C. Rewrites private addresses to a shared public IP NAT also hides internal addressing and only allows return traffic by default.
Which DNS record maps a host name to an IPv4 address?
- An A record
- An AAAA record
- An MX record
- A TXT record
Answer: A. An A record AAAA maps to IPv6, MX names mail servers, TXT holds text such as SPF and domain verification.
What does TLS provide for HTTPS?
- Faster page loads, and nothing more than that
- Compression of HTML, CSS and JavaScript files
- Resolution of domain names into IP addresses
- Encryption, integrity and server authentication
Answer: D. Encryption, integrity and server authentication TLS 1.3 is the current version; TLS 1.0 and 1.1 are deprecated.
Which layer does a layer 7 load balancer inspect that a layer 4 load balancer does not?
- Source and destination IP addresses
- Application data, like HTTP paths and headers
- TCP and UDP port numbers
- Ethernet MAC addresses of each host
Answer: B. Application data, like HTTP paths and headers Layer 7 can route /api to one pool and /images to another; layer 4 balances by IP and port.
Two virtual networks with address spaces 10.1.0.0/16 and 10.1.128.0/17 need to be peered. What is the problem?
- Peering requires both networks to use exactly a /16 prefix
- The ranges overlap, so they can't be peered without readdressing
- Networks with a /17 prefix aren't allowed to be peered at all
- There's no problem; overlapping ranges peer without any issue
Answer: B. The ranges overlap, so they can't be peered without readdressing Plan non-overlapping address spaces early, including on-premises ranges.
Why doesn't a stateful firewall need a rule for reply traffic?
- Replies use ICMP, which is always allowed
- It blocks all replies by design
- Replies are never filtered by firewalls
- It tracks connections and allows their replies
Answer: D. It tracks connections and allows their replies A stateless filter judges each packet alone.
What is the difference between latency and bandwidth?
- They're the same thing, measured in different units
- Latency is travel delay; bandwidth is data per second
- Bandwidth is measured in milliseconds, latency in Mbps
- Latency only matters for storage, not for networks
Answer: B. Latency is travel delay; bandwidth is data per second A high-bandwidth link can still feel slow if latency is high, especially for chatty protocols.
What happens in the TCP three-way handshake?
- The client sends ACK, ACK, ACK
- The server sends a certificate, then the client sends a key
- The client sends GET, the server sends 200, the client sends FIN
- The client sends SYN, the server replies SYN-ACK, and the client answers ACK
Answer: D. The client sends SYN, the server replies SYN-ACK, and the client answers ACK The handshake sets initial sequence numbers before data flows.
More Cloud and DevOps
- Cloud Fundamentals: IaaS, PaaS, SaaS and Shared Responsibility
- Azure Core Services
- AWS Core Services
- Google Cloud Basics
- Serverless: Azure Functions and AWS Lambda
- Containers and Docker
- Kubernetes
- Infrastructure as Code: Terraform and Bicep
- CI/CD Pipelines: GitHub Actions and Azure DevOps
- Cloud Identity and Access: Entra ID, IAM and RBAC
- Secrets Management and Key Vault
- Monitoring and Alerting: Application Insights and CloudWatch
- Cloud Cost Management