Interview Q&A / Computer Networks
Computer Networks interview questions
What happens when you open a website, TCP vs UDP, DNS and HTTP.
Prefer rapid revision? Practise Computer Networks short interview answers →
- What is an IP address, a subnet and CIDR notation like /24?
An IPv4 address is a 32-bit number that identifies a device on a network. CIDR notation such as 192.168.1.0/24 says how many leading bits are the network part; the rest identify hosts. A /24 has 256 addresses (254 usable), a /16 has 65,536, and each extra bit halves the size of the subnet.
IntermediateIn-depth4 min read - What are the private IP ranges, and what are loopback and link-local addresses?
Private ranges are 10.0.0.0/8, 172.16.0.0/12 (172.16.0.0 to 172.31.255.255) and 192.168.0.0/16. They are not routed on the public internet. Loopback is 127.0.0.0/8 (your own machine) and link-local is 169.254.0.0/16 (self-assigned when DHCP fails).
BeginnerQuick answer1 min read - What is a port number, and how is it different from an IP address?
An IP address identifies a machine on a network. A port number (0 to 65535) identifies which program on that machine should receive the data. Together they pick out one exact conversation endpoint.
BeginnerQuick answer1 min read - What is the difference between IPv4 and IPv6, and how do you shorten an IPv6 address?
IPv4 uses 32-bit addresses (about 4.3 billion), IPv6 uses 128-bit addresses (about 3.4 x 10^38). IPv6 is written as eight hex groups; you may drop leading zeros in each group and replace one run of all-zero groups with ::.
BeginnerQuick answer1 min read