Skip to content

1Kyryll/CompTIA-Network-Coursework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

CompTIA Network+ Coursework

A small collection of Python scripts I wrote while studying for the CompTIA Network+ certification. Instead of just memorizing concepts from the exam objectives (DNS resolution, subnetting, IP fragmentation, etc.), I implemented them in code so I'd actually understand the mechanics underneath.

These aren't production tools — they're learning artifacts. They show how I approach studying: when a topic clicks better by building it, I build it.

Scripts

All scripts live in scripts/.

dns_lookup.py

A DNS resolver with a TTL-aware in-memory cache. Performs a forward lookup using dnspython, prints the returned TTL, caches the result until expiry, and serves subsequent requests from cache while showing the remaining TTL. Demonstrates how recursive resolvers actually behave — TTL isn't just trivia, it dictates cache lifetime.

python scripts/dns_lookup.py example.com A

dns_reverse.py

Minimal reverse DNS (PTR) lookup. Takes an IP, builds the in-addr.arpa name via dns.reversename, and resolves the PTR record to a hostname.

dns_tool.py

A unified CLI that handles both forward (A, AAAA, MX, NS, TXT, …) and reverse (PTR) lookups in a single tool. Picks the right resolver path based on the record type argument.

python scripts/dns_tool.py 8.8.8.8 PTR
python scripts/dns_tool.py example.com MX

packet_fragmenter.py

Simulates IPv4 fragmentation. Given a payload and an MTU, it accounts for the 20-byte IP header and splits the data into MTU-sized fragments — the same logic a router applies when a packet exceeds the link MTU. Useful for visualizing why MTU mismatches and fragmentation overhead matter.

seven_second_subnetting.py

An implementation of the "seven-second subnetting" method using bitwise math. Given an IP and CIDR, it computes:

  • the subnet mask (0xffffffff << (32 - cidr))
  • the network ID (ip & mask)
  • the broadcast address (ip | ~mask)

Writing this out forced me to internalize why the shortcut method works rather than just memorizing the table.

Why this is in my portfolio

  • I learn by building. Reading about subnet math is one thing; writing the bit-shifts yourself is another.
  • Concepts, not just commands. Each script targets a specific Network+ objective (DNS, TTLs, fragmentation/MTU, subnetting) and reproduces it from first principles.
  • Comfortable across the stack. Even at a junior level, I'm reaching for libraries (dnspython), CLI argument handling, caching with expiry, and bitwise operations — not just running nslookup and calling it studied.

Requirements

pip install dnspython

Python 3.x. Tested on Windows during the coursework.

Status

Archived study material from my Network+ prep. Kept public because the implementations are a fair sample of how I think through networking fundamentals.

About

CompTIA Network+ Coursework scripts written in Python, covers topics like DNS, Subnetting etc.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages