Bird
Raised Fist0
Computer Networksknowledge~20 mins

DHCP for automatic IP assignment in Computer Networks - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
DHCP Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
How DHCP assigns IP addresses

What is the main process by which a DHCP server assigns an IP address to a device on a network?

AThe device manually sets its IP and informs the DHCP server.
BThe device requests an IP and the DHCP server offers one from its pool, then the device accepts it.
CThe DHCP server assigns the same IP address to every device that connects.
DThe device randomly picks an IP and the DHCP server confirms if it is free.
Attempts:
2 left
💡 Hint

Think about how the device and server communicate to avoid IP conflicts.

📋 Factual
intermediate
2:00remaining
DHCP lease time purpose

What is the purpose of the DHCP lease time?

AIt is the time a device waits before requesting an IP again after disconnecting.
BIt sets the time the DHCP server waits before assigning an IP.
CIt defines how long a device can keep an assigned IP before it must renew or release it.
DIt controls how long the DHCP server stores device information permanently.
Attempts:
2 left
💡 Hint

Consider why IP addresses might need to be reused over time.

🔍 Analysis
advanced
2:00remaining
Troubleshooting DHCP IP conflicts

A network has two devices with the same IP address causing connection issues. Which DHCP-related cause is most likely?

AThe DHCP server's IP pool overlaps with manually assigned static IPs.
BThe DHCP server assigned the same IP twice by mistake.
CThe devices are using different DHCP servers on the same network.
DThe DHCP lease time is set too long.
Attempts:
2 left
💡 Hint

Think about how static IPs and DHCP pools can conflict.

❓ Comparison
advanced
2:00remaining
Dynamic vs Static IP assignment

Which statement correctly compares dynamic IP assignment via DHCP and static IP assignment?

ADynamic IPs are always faster than static IPs in network communication.
BDynamic IPs require manual configuration; static IPs are assigned automatically.
CStatic IPs are assigned by DHCP servers; dynamic IPs are chosen by devices themselves.
DDynamic IPs change over time and are assigned automatically; static IPs are fixed and set manually.
Attempts:
2 left
💡 Hint

Consider how IP addresses are managed and assigned in each method.

❓ Reasoning
expert
2:00remaining
Effect of DHCP server failure on a network

What is the most likely effect on devices trying to join a network if the DHCP server fails completely?

ANew devices cannot get IP addresses automatically and may fail to connect to the network.
BAll devices keep their IPs and continue working without any issues.
CDevices will automatically switch to static IPs assigned by the router.
DThe network will assign IPs randomly to devices without the DHCP server.
Attempts:
2 left
💡 Hint

Think about what role the DHCP server plays when devices first connect.

Practice

(1/5)
1. What is the main purpose of DHCP in a computer network?
easy
A. To automatically assign IP addresses to devices
B. To manually configure network settings
C. To block unauthorized devices from connecting
D. To increase the speed of the internet connection

Solution

  1. Step 1: Understand DHCP's role

    DHCP stands for Dynamic Host Configuration Protocol and its main job is to assign IP addresses automatically to devices on a network.
  2. Step 2: Compare options

    Only To automatically assign IP addresses to devices describes automatic IP assignment, which is the core function of DHCP.
  3. Final Answer:

    To automatically assign IP addresses to devices -> Option A
  4. Quick Check:

    DHCP = automatic IP assignment [OK]
Hint: DHCP = automatic IP assignment, not manual setup [OK]
Common Mistakes:
  • Confusing DHCP with manual IP configuration
  • Thinking DHCP controls internet speed
  • Assuming DHCP blocks devices
2. Which of the following is the correct sequence of DHCP message types during IP assignment?
easy
A. DHCPREQUEST -> DHCPDISCOVER -> DHCPACK -> DHCPOFFER
B. DHCPOFFER -> DHCPDISCOVER -> DHCPACK -> DHCPREQUEST
C. DHCPDISCOVER -> DHCPOFFER -> DHCPREQUEST -> DHCPACK
D. DHCPACK -> DHCPREQUEST -> DHCPDISCOVER -> DHCPOFFER

Solution

  1. Step 1: Recall DHCP message flow

    The client first sends DHCPDISCOVER to find servers, servers reply with DHCPOFFER, client requests IP with DHCPREQUEST, and server confirms with DHCPACK.
  2. Step 2: Match sequence with options

    Only DHCPDISCOVER -> DHCPOFFER -> DHCPREQUEST -> DHCPACK correctly lists the sequence: DHCPDISCOVER -> DHCPOFFER -> DHCPREQUEST -> DHCPACK.
  3. Final Answer:

    DHCPDISCOVER -> DHCPOFFER -> DHCPREQUEST -> DHCPACK -> Option C
  4. Quick Check:

    DHCP message order = B [OK]
Hint: Remember: Discover, Offer, Request, Acknowledge [OK]
Common Mistakes:
  • Mixing up the order of DHCP messages
  • Confusing DHCPREQUEST with DHCPDISCOVER
  • Thinking DHCPACK comes before DHCPREQUEST
3. Consider this simplified DHCP client log:
1. Sent DHCPDISCOVER
2. Received DHCPOFFER (IP: 192.168.1.10)
3. Sent DHCPREQUEST (IP: 192.168.1.10)
4. Received DHCPACK

What IP address will the client use?
medium
A. 192.168.1.1
B. 192.168.1.10
C. 192.168.0.10
D. No IP assigned yet

Solution

  1. Step 1: Analyze DHCP messages

    The client received an offer for IP 192.168.1.10 and requested that same IP.
  2. Step 2: Confirm IP assignment

    The server acknowledged the request with DHCPACK, so the client will use 192.168.1.10.
  3. Final Answer:

    192.168.1.10 -> Option B
  4. Quick Check:

    DHCPACK confirms offered IP [OK]
Hint: IP in DHCPACK is the assigned address [OK]
Common Mistakes:
  • Choosing an IP not offered by the server
  • Assuming IP is assigned before DHCPACK
  • Confusing offered IP with default gateway
4. A network administrator notices devices are not getting IP addresses automatically. Which DHCP server issue is most likely causing this?
medium
A. DHCP server is turned off or unreachable
B. Devices have static IP addresses set
C. Network cables are unplugged
D. Internet connection is slow

Solution

  1. Step 1: Identify DHCP failure cause

    If devices do not get IPs automatically, the DHCP server might be off or unreachable, preventing IP assignment.
  2. Step 2: Evaluate other options

    Static IPs do not stop DHCP from working; unplugged cables affect connectivity but not DHCP server status; slow internet does not affect DHCP IP assignment.
  3. Final Answer:

    DHCP server is turned off or unreachable -> Option A
  4. Quick Check:

    DHCP server must be active for IP assignment [OK]
Hint: Check if DHCP server is running first [OK]
Common Mistakes:
  • Blaming slow internet for DHCP issues
  • Ignoring DHCP server status
  • Assuming unplugged cables cause DHCP failure
5. In a large office, multiple DHCP servers are configured with overlapping IP address ranges. What problem can this cause?
hard
A. Devices will only get IPs from the first DHCP server found
B. DHCP servers will automatically merge their IP pools
C. Network speed will increase due to load sharing
D. Devices may receive duplicate IP addresses causing network conflicts

Solution

  1. Step 1: Understand overlapping IP ranges

    If two DHCP servers assign IPs from overlapping ranges, they might give the same IP to different devices.
  2. Step 2: Identify network impact

    Duplicate IP addresses cause conflicts, making devices unable to communicate properly on the network.
  3. Final Answer:

    Devices may receive duplicate IP addresses causing network conflicts -> Option D
  4. Quick Check:

    Overlapping DHCP ranges cause IP conflicts [OK]
Hint: Avoid overlapping IP ranges to prevent conflicts [OK]
Common Mistakes:
  • Thinking DHCP servers merge IP pools automatically
  • Assuming only one server assigns IPs
  • Believing network speed improves with overlapping ranges
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard