0%
Reading Settings
Font Size
18px
Line Height
1.5
Letter Spacing
0.01em
Font Family
Table of contents
    blog cover

    Quick Test Your IP Knowledge

    Software Engineer
    Software Engineer
    Interview
    Interview
    published 2025-09-09 14:35:43 +0700 · 5 mins read
    You don’t need to be a software engineer to have heard of IP addresses. They pop up everywhere in our digital lives, from setting up Wi-Fi to troubleshooting connection issues. In this post, I’ve collected some common questions so you can quickly check your knowledge about IP. It’s not only useful if you’re preparing for an interview, but also a good way to strengthen your fundamentals.

     Just read the question, pause, and try to answer it in your head before looking at the answer.

    1. Questions

    Basic IP Concepts

    1. What is an IP address and what does it stand for?
    2. How many bits are there in an IPv4 address?
    3. Which classes of IPv4 addresses exist (A, B, C, D, E)?
    4. How many bits are there in an IPv6 address?
    5. What is the difference between a public IP and a private IP?
    6. What is the loopback IP address?
    👉 Answer

    Real-World IP

    1. What is a router?
    2. How does a router assign IP addresses?
    3. How does a router process requests between devices and the Internet?
    4. What is the router’s IP vs. your ISP’s IP?
    5. What happens when you use a VPN?
    6. What is NAT (Network Address Translation) and why is it important?
    7. What’s the difference between IPv4 and IPv6 in real-world use?
    👉 Answer

    Subnetting Fundamentals

    1. What is a subnet mask used for?
    2. Convert the subnet mask 255.255.255.0 to CIDR notation.
    3. How many usable host addresses are available in a /24 subnet?
    4. What is the network address of 192.168.1.130/25?
    5. What is the broadcast address of 10.0.4.75/22?
    6. How many subnets can be created from a /16 network if we borrow 4 bits?
    👉 Answer

    2. Basic IP Concepts

    Q: What is an IP address and what does it stand for?
    An IP address stands for Internet Protocol address. It’s a unique identifier that allows devices to send and receive data across a network. Think of it like the digital "home address" of your device.

    Q: How many bits are there in an IPv4 address?
    IPv4 uses 32 bits, which are usually written as four numbers separated by dots (like 192.168.1.1).
    Source: https://www.networkacademy.io/ccna/ip-subnetting/converting-ip-addresses-into-binary


    Q: Which classes of IPv4 addresses exist (A, B, C, D, E)?
    In the early days of networking, IPv4 addresses were divided into classes to make it easier to allocate IP ranges. Each class has a fixed size and purpose:
    • Class A: Starts with 1–126 in the first octet. Designed for very large networks (millions of hosts). Example: 10.0.0.0.
    • Class B: Starts with 128–191 in the first octet. Medium-sized networks (thousands of hosts). Example: 172.16.0.0.
    • Class C: Starts with 192–223 in the first octet. Small networks (up to 254 hosts). Example: 192.168.0.0.
    • Class D: Starts with 224–239. Used for multicast (sending data to many systems at once).
    • Class E: Starts with 240–255. Reserved for experimental use.
    Source: https://www.adroitacademy.com/blog/What-are-the-classes-of-IPv4-Addresses
    These classes aren’t used much anymore because the Internet moved to CIDR (Classless Inter-Domain Routing). Instead of fixed classes (A, B, C), CIDR allows you to choose exactly how many bits are for the network and how many are for hosts, using slash notation (like /24, /16, etc.)

    Q: How many bits are there in an IPv6 address?
    IPv6 uses 128 bits, written in hexadecimal and separated by colons (like 2001:db8::1).
    Source: https://en.wikipedia.org/wiki/IPv6_address


    Q: What is the difference between a public IP and a private IP?
    A public IP is globally unique and used to communicate over the Internet. A private IP is used only inside a local network (like your home Wi-Fi) and cannot be reached directly from the outside world.
    Private IPs always fall into these ranges (defined by RFC 1918):
    • 10.0.0.0/8 (very large, used a lot in enterprises and AWS VPCs)
    • 172.16.0.0/12 (medium, often chosen by ISPs or mid-size companies)
    • 192.168.0.0/16 (small, the default for most home routers)
    If your IP is outside these ranges, it’s public.

    Q: What is the loopback IP address?
    In IPv4 it’s 127.0.0.1, and in IPv6 it’s ::1. It’s used when a computer needs to talk to itself.

    3. Real-World IP

    Q: What is a router?
    A router is the device that connects your home or office network to the Internet. It acts as a traffic controller:
    • Inside the network: it assigns private IPs to devices (like 192.168.1.x).
    • Outside: it uses a public IP (from your ISP) to communicate with the Internet. Modern routers often combine multiple roles: router + switch + Wi-Fi access point + firewall.

    Q: How does a router assign IP addresses?
    Most routers use DHCP (Dynamic Host Configuration Protocol). When a new device connects, the router gives it an IP from a pool (e.g., 192.168.1.100192.168.1.200).
    • Example: You turn on your phone → it sends a DHCP request → the router replies with "Here’s your IP, gateway, and DNS."
    • You can also assign static local IPs (e.g., always making your printer 192.168.1.50).

    Q: How does a router process requests between devices and the Internet?
    Routers use NAT (Network Address Translation) to map many private IPs to a single public IP.
    • You visit google.com → your laptop sends a request to the router.
    • The router swaps your private IP (192.168.1.20) with the public IP (say 116.193.74.42).
    • Google replies to the public IP → the router translates it back to your laptop.
    This is how hundreds of devices at home can share a single Internet connection.

    Q: What is the router’s IP vs. your ISP’s IP?
    • Router IP (private): The gateway address inside your network, usually 192.168.1.1 or 10.0.0.1
    • ISP IP (public): The Internet-facing IP your provider assigns to you.

    Q: What happens when you use a VPN?
    When you connect to a VPN:
    • Your device gets a private IP inside the VPN tunnel (like 10.8.0.2).
    • To the Internet, your traffic looks like it’s coming from the VPN server’s public IP.
    Example:
    • Without VPN → websites see 116.193.74.42 (your ISP).
    • With VPN → websites see 54.210.123.10 (the VPN server).

    Q: What is NAT (Network Address Translation) and why is it important?
    NAT lets many private devices share one public IP.
    • Home example: Your router allows all your devices to use the Internet with one public IP.
    • ISP example: Carrier-Grade NAT means hundreds of customers might sit behind one public IP.
    Without NAT, IPv4 would have run out long ago.

    Q: What’s the difference between IPv4 and IPv6 in real-world use?
    • IPv4: 32-bit, ~4.3 billion addresses. Nearly exhausted.
    • IPv6: 128-bit, essentially unlimited addresses. No NAT required.
    Most ISPs and websites now run both IPv4 and IPv6 ("dual-stack").

    4. Subnetting Fundamentals

    Q: What is a subnet mask used for?
    A subnet mask separates the network portion and host portion of an IP address. For example, in corporate networks, subnetting lets IT teams isolate traffic: one subnet for employees, one for servers, one for guest Wi-Fi. This improves security and prevents broadcast traffic from flooding the whole network.

    Q: Convert the subnet mask 255.255.255.0 to CIDR notation.
    Convert 255.255.255.0 to binary
    11111111.11111111.11111111.00000000
    first 24 bits are the network, last 8 bits are for hosts. So the answer is /24

    Q: How many usable host addresses are available in a /24 subnet?
    A /24 has 256 total addresses, but 2 are reserved (network and broadcast). That leaves 254 usable addresses. For example, if your office LAN is 192.168.1.0/24, you can assign 254 devices (PCs, printers, IP cameras, etc.).

    Q: What is the network address of 192.168.1.130/25?
    It’s 192.168.1.128. A /25 splits a /24 into two halves: 192.168.1.0–127 and 192.168.1.128–255. The .128 marks the start of the second subnet.

    Q: What is the broadcast address of 10.0.4.75/22?
    A /22 covers 1,024 addresses (10.0.4.010.0.7.255). The broadcast address is 10.0.7.255. In practice, this is important if you’re segmenting large private ranges inside a data center.

    Q: How many subnets can be created from a /16 network if we borrow 4 bits?
    Borrowing 4 bits makes it /20. That gives 16 subnets, each with 4,094 usable addresses. ISPs and cloud providers often do this when carving up a large allocation into smaller customer blocks.

    Related blogs