Hands-on code demonstrations of network communication principles at different model layers.
Demonstrates core networking utilities like ping, traceroute, and netcat in action.
Python/Shell examples that visualize layer-specific functions like TCP connection and IP routing.
HTTP/HTTPS Request
$ curl -v https://api.hackclub.com/data
> GET /data HTTP/1.1
> Host: api.hackclub.com
> ...
TCP Socket Communication
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('example.com', 80))
s.send(b'GET / HTTP/1.1\\r\\nHost: example.com\\r\\n\\r\\n')
print(s.recv(4096))
IP Routing & Traceroute
$ traceroute hackclub.com
1 192.168.1.1 (192.168.1.1) 0.878 ms
2 10.10.10.1 (10.10.10.1) 1.896 ms
3 142.250.179.74 (142.250.179.74) 2.104 ms
ARP Table & Ethernet Frame
$ arp -a
? (192.168.1.1) at 00:1d:84:55:39:25 [ether] on eth0
Network Interface Details
$ ethtool eth0
Settings for eth0:
Speed: 1000Mb/s
Duplex: full
Link detected: yes
Type a URL and see how its data passes through the OSI model
Resolves domain names to IP addresses
$ dig hackclub.com
;; ANSWER SECTION:
hackclub.com. 600 IN A 142.251.176.113
View explanation
Detects open network services
$ nmap hackclub.com
Starting Nmap 7.94
PORT STATE SERVICE
80/tcp open http
View explanation
Lists wireless access points
$ iwlist wlan0 scan
ESSIDs: 1
HackClub
HomeWiFi
Starbucks-6G
View explanation