Day 03 Applied Skills

TCP/IP and Ports

IP addresses, subnets, ports, TCP vs UDP, and practical tools: curl, netcat, and nmap.

~1 hour Hands-on Precision AI Academy

Today's Objective

Learn the core concepts of TCP/IP and Ports and apply them in practical exercises.

01

IP Addresses and Ports

IP Addresses
IP Addresses
# IPv4: 4 octets, each 0-255
192.168.1.100
10.0.0.1         ← private (10.x.x.x)
172.16.0.1       ← private (172.16-31.x.x)
192.168.0.1      ← private (192.168.x.x)
127.0.0.1        ← loopback (this machine)

# IPv6: 128 bits
2001:0db8:85a3::8a2e:0370:7334

# Check your IP
curl ifconfig.me          # public IP
ip addr show              # local IPs (Linux)
ipconfig                  # local IPs (Windows)
Ports
Ports
# Well-known ports
22    SSH
25    SMTP
53    DNS
80    HTTP
443   HTTPS
3306  MySQL
5432  PostgreSQL
6379  Redis
27017 MongoDB

# Check open ports
ss -tlnp          # listening TCP ports
nmap localhost    # scan local ports

# Test if a port is open
nc -zv hostname 443
curl -v telnet://hostname:443
TCP vs UDP
TCP vs UDP
# TCP: connection-oriented, reliable
# - Handshake before data
# - Guarantees delivery and order
# - Used for: HTTP, HTTPS, SSH, databases

# UDP: connectionless, fast
# - No handshake, fire and forget
# - Faster, lower overhead
# - Used for: DNS, video streaming, gaming, VoIP

# Test TCP connection
curl -w 'Connected in %{time_connect}s\n' -o /dev/null -s https://github.com

Supporting References & Reading

Go deeper with these external resources.

MDN Web Docs
TCP/IP and Ports HTTP reference and guides.
YouTube
TCP/IP and Ports Networking fundamentals for developers
MDN
MDN Web Docs Comprehensive web technology reference

Day 3 Checkpoint

Before moving on, confirm understanding of these key concepts:

Continue To Day 4
Day 4 of the Networking for Developers course