| Layer | Name | Protocols | Data Unit |
|---|
| 7 | Application | HTTP, DNS, SMTP, FTP | Data |
| 6 | Presentation | TLS/SSL, JPEG, ASCII | Data |
| 5 | Session | NetBIOS, RPC | Data |
| 4 | Transport | TCP, UDP | Segment/Datagram |
| 3 | Network | IP, ICMP, ARP | Packet |
| 2 | Data Link | Ethernet, Wi-Fi, MAC | Frame |
| 1 | Physical | Cables, Hubs, Radio | Bits |
Mnemonic: All People Seem To Need Data Processing
| Port | Service |
|---|
| 20/21 | FTP (data/control) |
| 22 | SSH |
| 23 | Telnet |
| 25 | SMTP |
| 53 | DNS |
| 80 | HTTP |
| 110 | POP3 |
| 135 | RPC |
| 139/445 | SMB |
| 143 | IMAP |
| 389 | LDAP |
| 443 | HTTPS |
| 465 | SMTPS |
| 636 | LDAPS |
| 993 | IMAPS |
| 995 | POP3S |
| 1433 | MSSQL |
| 1521 | Oracle DB |
| 3306 | MySQL |
| 3389 | RDP |
| 5432 | PostgreSQL |
| 5900 | VNC |
| 6379 | Redis |
| 8080 | HTTP Alt |
| 8443 | HTTPS Alt |
| 27017 | MongoDB |
| Port | Service |
|---|
| 53 | DNS |
| 67/68 | DHCP |
| 69 | TFTP |
| 123 | NTP |
| 161/162 | SNMP |
| 500 | IKE/IPSec |
| 514 | Syslog |
Client → Server: SYN
Server → Client: SYN-ACK
Client → Server: ACK
--- Connection Established ---
Client → Server: FIN
Server → Client: ACK + FIN
Client → Server: ACK
--- Connection Closed ---
| Flag | Meaning |
|---|
| SYN | Synchronize — start connection |
| ACK | Acknowledge |
| FIN | Finish — end connection |
| RST | Reset — abort connection |
| PSH | Push — send data immediately |
| URG | Urgent data |
| Class | Range | Default Subnet | Use |
|---|
| A | 1.0.0.0 – 126.255.255.255 | /8 | Large networks |
| B | 128.0.0.0 – 191.255.255.255 | /16 | Medium networks |
| C | 192.0.0.0 – 223.255.255.255 | /24 | Small networks |
10.0.0.0/8 (10.0.0.0 – 10.255.255.255)
172.16.0.0/12 (172.16.0.0 – 172.31.255.255)
192.168.0.0/16 (192.168.0.0 – 192.168.255.255)
| CIDR | Subnet Mask | Hosts |
|---|
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /29 | 255.255.255.248 | 6 |
| /30 | 255.255.255.252 | 2 |
| Type | Purpose |
|---|
| A | IPv4 address |
| AAAA | IPv6 address |
| CNAME | Alias to another hostname |
| MX | Mail server |
| NS | Name server |
| TXT | Text (SPF, DKIM, verification) |
| PTR | Reverse DNS lookup |
| SOA | Start of Authority |
| SRV | Service location |
| Code | Meaning |
|---|
| 200 | OK |
| 201 | Created |
| 204 | No Content |
| 301 | Moved Permanently |
| 302 | Found (redirect) |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 405 | Method Not Allowed |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
| 502 | Bad Gateway |
| 503 | Service Unavailable |