Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Core Networking Concepts for Security

EasyPython00:00
Practice interviewer
In session
5 left
00:00

Your question is Core Networking Concepts for Security. Start with the requirements on the right.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.

Problem

What basic networking concepts should you understand for a security engineer interview?

As a hands-on exercise, implement classify_ipv4 to classify IPv4 addresses using private RFC 1918 ranges. Return one result per input: "private", "public", or "invalid".

Signature: def classify_ipv4(addresses): Input is a list of strings, and output is a list of classification strings.

Constraints

  • 1 <= len(addresses) <= 100
  • Each address contains printable characters and has length at most 15
  • A valid IPv4 address has exactly four decimal octets
  • Private addresses are limited to RFC 1918 ranges

Function Signature

def classify_ipv4(addresses):
Your solutionPython 3
You need to log in / sign up to run or submit.
Run your code to see test output